Updating a Template

Templates aren’t useful just for rapidly building pages; they also make quick work of site updates. Template-based pages maintain a link to their original template; Dreamweaver automatically passes changes you make to the original template along to every page built from it. If you used templates to build your site, you probably won’t cry on your keyboard when the boss asks you to add an additional button and a link to the navigation bar. Instead of editing every page, you can simply open the template file, update the navigation bar, and let Dreamweaver apply the update to all your pages.

You update a template (and all the pages based on it) like this:

  1. Choose Window→Assets.

    The Assets panel appears.

  2. Click the Templates button.

    A list of the site’s templates appears.

  3. Double-click the template’s name to open it.

    Alternatively, you can select the template in the Assets panel, and then click the Edit button to open the original template (.dwt) file. The template opens.

    Tip

    You can also open a template by double-clicking the appropriate template file name (.dwt) in the Templates folder in the Files panel.

  4. Edit the template as you would any web page.

    Since this is the original template file, you can edit any of the HTML in the document, including Cascading Style Sheets, meta tags, and layers. You can also add or remove editable regions.

    Take care, however, to edit only the areas that you did not mark as editable regions. The reason: When you update your pages, any region marked ...

Get Dreamweaver CS6: The Missing Manual now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.