Of the four brethren, snippets, components, stationery, and templates, templates are by far the most powerful. By building a template-based site, you can update the entire look of your Web site quickly and easily. Templates require a little more setup than stationery pages, so we devote the next several tips exclusively to the topic of templates.
Note Another powerful way of making site-wide visual changes is to employ Cascading Style Sheets (see Chapter 5). The idea behind a template is that certain areas of the page are locked and unchangeable, while other areas are editable. Locked areas typically include the parts of the page that repeat throughout the site, such as navigation bars, while editable regions contain elements that will vary on each page, such as the text. As you create your template page, you specify which areas of the page are editable via the Template Regions palette, found in the Window menu. To create an editable region, make a selection on the page and then click the Create New Editable Region button in the Template Regions palette. GoLive automatically names text regions according to the first few words in the selection. Other objects are simply named Object or Region. You can rename any region by clicking on its name in the Template Regions palette and pressing Return/Enter, or by clicking a second time (Figure 133a). Figure 133a. GoLive automatically gives newly created regions a name, but they are easily edited in the Template Regions palette.You can turn off the automatic naming of regions by disabling Selection Defines Region Name in the Template Regions flyout menu. By turning it off, all new regions will simply be called Region2, Region3, and so on. Editable regions are highlighted on the page in dark green, making them very easy to identify. You can determine a region's location on the page by double-clicking its name in the Template Regions palette, which will show the region with a lighter green highlight (Figure 133b). Figure 133b. Editable regions that appear light gray here are highlighted in green on your template page.
Create as many editable regions on the page as you need and then save the page as a template by choosing File > Save as and then clicking Templates from the Site Folder pop-up in the Save dialog box, or choose Save as > Template, from the document's flyout menu. The new template page will appear in both the Templates folder of the Extras tab in the Site window and in the Templates portion of the Library palette. Note You must specify at least one editable region on a page before the template will perform like a template. When no editable regions are indicated, GoLive treats the page as a normal page, and you won't be able to create new pages from it. |