Nested Templates

Large sites may have many different sections or types of pages. Each section or type of page may have its own unique look. A Frequently Asked Questions page may have distinct areas for a question, an answer, and links to further resources, while a product page may have a picture, a product description, and ordering information. You could create different templates for each type of page, but even that may be more work than necessary.

Note

Nested templates are a somewhat advanced and potentially confusing concept. Many people happily use Dreamweaver templates without ever using the nested template feature.

While many pages in a site may have subtle differences, they usually share very basic design features. The overall structure of every page, for example, may be the same: same logo, banner, and navigation bar. Even the basic layout may be the same (sidebar on the left, main content in the middle, for example). And therein lies the problem with creating individual templates for each section of a website: if you need to make a very basic sitewide change, like adding a new button to the navigation bar or altering a sitewide banner, you need to edit each template individually, adding extra time, effort, and the chance of making a mistake.

Good news—Dreamweaver offers a tool to solve just this problem: nested templates. A nested template is one you make from an existing template, which then becomes the master template (see Figure 20-13).

Imagine a basic software company website ...

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.