Untitled Document
Using Templates
Creating a
template document
A template allows you to save the design of a
web page and re-use it without having to create it from scratch. Often you will
use several templates within a web site to accommodate different types of web
pages. You might have a template for major unit pages, a template for
individual detail pages, a template for pop-up windows, etc.
- Create
a web page that contains the design you wish to use for multiple
documents.
- Select File >
Save as Template...
- Dreamweaver will ask you
to name the template. Enter a name and click "Save."
- The
page is now a template document.

Creating an
editable region within a template document
In a template certain areas will stay constant.
These may include the banner, the navigation aids, the basic layout, etc. Other
elements, such as the body text or the name of the person responsible for the
page may change from page to page. Tell Dreamweaver which elements will change from page to page by defining them as editable
regions.
- Select
an area that will change from page to page.
- Select Insert > Template
Objects > Editable Region
- In
the "New Editable Region" dialog box enter a name for the editable
region.
- Click
"OK."
- Note
that editable regions now have a light blue outline while you are editing
the template.
- Save
your changes.
Creating a new
document from the template
- Select File > New
- Click
on the "Templates" tab.
- Select
the site you are working in and the name of the template you wish to use.
- A
preview of the template will appear in the window on the right.
- Click
"Create."
- You
can only modify items within editable regions. You can recognize these by
their blue background or outline.
- If
you wish to make changes to other areas you must change them in the
template document.
- Select File > Save As and
save the new document with a unique name. Remember:
- The
main or "home" page for your site should be called
"index.html".
- Remember
not to use spaces or special characters such as & or / in the
filename.
- Use
the underscore _ in lieu of spaces if desired as in “my_cool_file.html.”
- Your
web page files should end in “.htm” or
“.html."
- Click
"Save."
Modifying your
template and updating dependent files
Changes you make to the original template file
will be automatically applied to all files you create from that template.
- In
the right (Local Folder) side of the Site window open the
"Templates" folder,
- Double-click
on the file with the name of the template you wish to modify to open it.
- Within
the template file you can redo any formatting you wish as long as you do
not delete or rename your editable regions (though they can be moved).
- If
you delete or rename an editable region you may lose information that was
included in those regions on the dependent pages.
- When
you have completed your changes, save them.
- Dreamweaver will ask if
you want to update the formatting to the pages that use the template.
Click "Update."
- Dreamweaver will update
all of the pages.
- Click
"Close" when it has completed updating them. The formatting
changes will have been applied to all of the dependent files.
Detaching a
dependent file from the template
Occasionally you might find that you no longer
want a document to be formatted according to the template. You can detach a
document from the template, permitting you to customize it individually.
- Open
the document you wish to detach from the template
- Select Modify >
Templates > Detach from Template.
- Note
that the light yellow indicating areas you could not modify are no longer
there and that you can freely make changes. Of course this means that the
document will no longer be updated when you make changes to the template.