Saving Time with Templates
Author: Shane
Fowlkes
Author's Site: RaccoonBob.com
Reference ID: 15612
When A Change Is Needed...
Now at this point, assume you forgot to include a header cell
in your template. You don't want to have to go through each page
and manually insert a new row in the table - it's too time consuming.
Just pretend you have dozens and dozens of pages to update instead
of just 3.
This is not a problem because all of your pages are based off of
and linked to the template. Try this:
- Open demo.dwt.
- Click inside the left, gray cell and go to Modify»
Tables» Insert Rows or Columns. Insert 1 row above
the current row. You should now have 2 new cells on top.
- Click in the new left, top cell and change the background color
to #CCCCCC.
- Click in the new right, top cell and change the background color
to #CCCCCC.
- Without leaving that cell, click the
<td> Tag Selector to select that
entire cell. Go to Modify» Templates»
New Editable Region and name this region "header".
You now have a new editable region called header.
- Type "header here" in this new area. The whole reason
to add this new editable region is that by adding this editable
region, you could now change the header on each page to suit the
page's content.
- Save the page and look what happens. You are prompted by Dreamweaver
to update the child pages based upon this template.
Click Update. (If you happen to have any pages open that
are dependent on the template, you will need to click Yes to Save
Changes when you try to close the window. This is because Dreamweaver
updated the page based upon the changes made to the template while
the page was open.)
- A status window will appear. Close it when you are done reviewing
it.
- Now close the template and view your site again in the browser
(you'll probably need to refresh/reload each page as the cached
version will probably still be displayed.)
How about that? The structure on every page has been updated!
This is an extremely powerful, site management tool that can allow
for easy site management. Once you get used to using templates,
you'll wonder how you ever got along without them!
Related Tutorials
Benefits of Using Templates
by Macromedia Support Center
URL: http://www.macromedia.com/go/13876
Understanding Editable and Non-Editable Regions
in Templates
by Macromedia Support Center
URL: http://www.macromedia.com/go/14804
Designing with Dreamweaver Templates
by Kim Cavanaugh
URL: http://www.dw-fw-beginners.com/tutorials/drmwvr/templ_1.htm
|