Accessibility

Time-saving templates

fpo[an error occurred while processing this directive]
Created:
2004-09-01

Excerpted from “Adobe GoLive CS Tips and Tricks” by Lynn Grillo and Adam Pratt.

By building a template-based site in Adobe® GoLive®, you can update the entire look of your Web site quickly and easily. 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.

You can create your own templates in GoLive or use the sample templates included with the software.

Create a template

As you create a 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 will automatically names text regions according to the first few words in the selection. Images, tables, grids, and other objects are simply named Region. You can rename any region by clicking on its name in the Template Regions palette and pressing Enter, or by clicking a second time.

gl7kbnewtemp_1_int

GoLive automatically gives newly created regions a name, but they are easily edited.

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 green, making them very easy to identify.

gl7kbnewtemp_2_int

Editable regions 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 > 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.

Editable CSS in the template head

Here's a nifty trick: If you have CSS written into a template page, when you make new pages from the template the CSS will be locked. You can't use the Template Regions palette to assign editable regions in the head, but you can go into the source code and add the necessary syntax yourself. Just add <!-- #BeginEditable "CSS" --> right before the <style> tag and <!-- #EndEditable --> right after the closing </style> tag. Although these regions won't show up in the Template Regions palette, when you create a page from the template you will be able to edit the CSS by double-clicking the CSS head tag in the page.

Use sample templates

You might have noticed that in the Template section of the Library palette a number of page templates and cascading style sheet (CSS) templates are tucked into the folder labeled Application-wide. Let's take a look at what's there and how you can make use of them.

First open the Library palette and select the Templates section. Enlarge the palette by dragging its lower right corner and then turn on Use Preview and Preview on Right in the palette menu. As you browse through the templates, a preview of the page appears in the preview area, making it easy for you to find a page to choose.

gl7kbnewtemp_3_int

Dozens of page templates are included in the Library palette.

Drag the page you've chosen into the templates folder in the Extras tab of the Site window and give it an appropriate name. You can now create new pages from the template, or modify the template to better suit your needs.

You may need to unlock the page to make modifications, but you can lock it again when you are done. To unlock the page, choose Special > Template > Unlock Page. Replace the image placeholders with images of your own, substitute the placeholder text with your own text, and then save the template. You can now use it as you would any other template in your site.

The fun part comes when you combine the page templates with one of the included CSS templates. You can change the entire look of a page (or site) by attaching an external style sheet to a template.

Excerpted from “Adobe GoLive CS Tips and Tricks” by Lynn Grillo and Adam Pratt. Copyright © 2004 by Peachpit Press. Used with the permission of Pearson Education and Peachpit Press. To buy this book, visit www.amazon.com.

About the author

[an error occurred while processing this directive]