Chapter 8. Templates

Dreamweaver templates can increase your efficiency significantly. If you use the same or similar layout across a series of pages, a template allows you to quickly redesign or update multiple pages at once. Templates are also great for workgroups; they let you standardize page layouts while preventing developers from accidentally deleting or changing locked elements. Let’s see how templates can enhance standardization and reduce development time. (If your site is heavily data-driven, consider using Dreamweaver UltraDev.)

Creating a Template

A template is similar to other HTML documents except that certain areas are locked. In fact, the entire template (except the page title) is locked by default; only the editable regions that you create within the template can be changed.

When designing templates, remember:

  • Information that should appear on all pages should be noneditable (part of the template).

  • Create editable regions to hold any page-specific information that will vary in pages that use the template.

  • Test your template before creating dozens of pages based on it. Although you can automatically update all pages based on a template, it is easiest when the changes are minor. Major changes to a template may require you to manually update the pages based on the template. For example, deleting an editable region from a template will delete the content in that region on each page, unless you move the content to another region (see Figure 8-8).

Tip

Documents created using ...

Get Dreamweaver in a Nutshell 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.