Updating a Template

Templates aren’t just useful for rapidly building pages; they also make quick work of site updates. Template-based pages maintain a link to the 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 the 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 (see Figure 20-4).

    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 (see Figure 20-4). The template opens.

    Tip

    You can also open a template by double-clicking the appropriate template file (.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 ...

Get Dreamweaver CS5: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.