DreamweaverFAQ.com
Search the site!Search DWfaq.com | Print This PagePrinter Friendly Page
Current: Default | Default: Raccoon Bob


DreamweaverFAQ.com » Tutorials » Basics » Saving Time With Templates


Saving Time with Templates

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:

  1. Open demo.dwt.

  2. 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.

  3. Click in the new left, top cell and change the background color to #CCCCCC.

  4. Click in the new right, top cell and change the background color to #CCCCCC.

  5. 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.
    Figure 2

  6. 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.

  7. 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.)
    Figure 3: Update Pages

  8. A status window will appear. Close it when you are done reviewing it.

  9. 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

::This page last modified 8/13/2013 at 03:37::

Copyright © 2001-2024 DreamweaverFAQ.com All Rights Reserved.
All brands, trademarks, tutorials, extensions, code, and articles are the property of their respective owners.
A production of Site Drive Inc.
Legal Notice | Privacy Policy | Disclaimer & Notice