Using Repeating Regions

The humble editable region is the heart of all templates—after all, the whole point of a template is to provide an easy way to create new pages with new content. You may find that templates with editable regions are all you ever need for your site. However, Dreamweaver provides several other template features that might come in handy.

Some web pages have types of content that repeat over and over on a page. For example, a catalog page may display row after row of the same product information—picture, name, price, and description. An index of Frequently Asked Questions may list questions and the dates visitors posted them. Dreamweaver provides a couple of ways to turn content like this into an editable region in a template.

You could, of course, make the entire area where the repeating content appears editable. For example, you could use one of Dreamweaver’s CSS layouts (see Chapter 9) to build a template for a FAQ page. The list of questions and answers go inside the page’s main <div> tag. You can turn this div into an editable region. The downside to this approach is that you won’t have any ability to enforce (or easily update) the HTML used to lay out the questions and answers, since another designer could edit or delete everything in the div.

Fortunately, Dreamweaver provides a pair of template tools to address the problem: repeating regions and repeating tables. Both let you create areas of a page that include editable (and uneditable) regions that you can ...

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.