

These notes are from
a chapter from Dreamweaver 4 Bible Preview (Ch 32, Templates).
Please download and review this pdf.
Dreamweaver tutorial
on Templates (Macromedia Dreamweaver 4 --> Tutorial --> Compass Site).
(Travel site with multiple destinations)
Templates:
- can have editable regions and
non editable regions.
- can be detached from HTML files
(but cannot be reattached)
Tips
- Use placeholders for editable
and nonediatble regions while you are setting up your template
- Put as much as possible into the
template
- Put as much as possible into the
editable regions (ie, so all you have to insert is the actual file name, etc)
- Meta info
- Behaviors, CSS, code is all in
the template because it is part of the head
Create a template
- Create your file, inserting as
much as possible.
- File --> Save As Template
- Dreamweaver creates a folder called
Templates and puts the .dwt file there.
- The title of your document now
starts with <<Template>>
- All of it is locked
Editable regions (you must give
each region a unique name)
- Make a current locked region editable
- Select the complete tag (ie,
<TD>....</TD>)
- Modify --> Templates -->
New editable region
- Enter a unique name -->
OK
- Create a new editable region
- Place the cursor anywhere
- Modify --> Templates -->
New editable region
- Enter name
Lock an editable region
- Place the cursor in region (or
you can select it from a dialog box later)
- Modify --> Templates -->
Remove editable region
- OK
Create HTML files from the template
- File --> New from Template
- You can see in the code that
the locked regions are highlighted
- You can see in the WSYWIG
that the cursor can only go into the editable regions and that the editable
regions are clearly labelled with their names
- You cannot add behaviors to files
from templates (must find a work around. The chapter has more on this)
Meta tags
- Already part of the template
- The <TITLE> tag is still
editable
- Can still add meta tags unique
to that page after the title tag, within the editable region
To change templates
- Templates must have the same editable
regions
- Open the current page
- Modify --> Templates -->
Apply template to page
- Select which template --> OK
Updating templates
- When you edit a template, Dreamweaver
asks if you want to update all the pages attached to that template
OR
- Modify --> Templates -->
Update pages
- Dialog box
The pdf chapter has even more information
and more detailed descriptions and directions than this outline. Please download
it and use it as reference as you need it.
ISP
361 Home | Course Outline