| Dreamweaver
Templates
Templates
allow you to easily update the style of the whole site.
Different templates can be applied to different areas
of the web site to ensure consistency within sections
(color, style etc)
The template ensures that some areas (such as the top
navigation) which don't need to change can't be accidentally
edited. The templates can contain all the information
needed for the page (which style sheet is attached,
which side navigation is used etc)
Creating a Template:
- Create a web page.
- Go to FILE/SAVE AS TEMPLATE
- Create a name for the template,
but do not change the file extension - it must remain
as .DWT
- Dreamweaver automatically saves
the template in a folder called /TEMPLATES.
- The template needs to have EDITABLE
REGIONS, so that pages created from it will
be able to be edited.
- Select an area, usually a table
cell, that will contain editable content.
- Go to MODIFY/TEMPLATES/NEW
EDITABLE REGION.
- Name the REGION.
- Continue doing this until all
your editable regions are formed.
It's best to keep this to a minimum, or there's no point
of having a template.
Creating Web Pages
from the Template:
- Go to "File > New from
Template"
- Select the template you wish
to use
- Go to "File > Save As"
and save the file where the new page will live
- Add content to the new page
- If changes are made to non-editable
areas of the template from which this page was created,
Dreamweaver will ask if you want to update the page
Applying a Template to an
Existing Web Page:
This
information is relevant only when you have an existing
html web page which hasn't ever had a template applied
to it, or had a different template applied.
- Open the page.
- From the top toolbar go MODIFY/TEMPLATES/APPLY
TEMPLATE TO PAGE.
- Choose the appropriate template.
- Dreamweaver may ask you where
you would like orphaned content to go, if there is
any. (Left over elements not defined in the template.)
- Select the editable area you
want the content to go.
- You may have to remove any extraneous
content manually.
|