TIP 136: Redefining Templates


Let's say you've based your site entirely on templates. Well done. Now maybe you get in a creative mood one day and come up with a completely new design. How do you take all those pages built upon one template and port them over to a new template? It's simple, really.

First save the new design as a template, making sure that you define its editable regions. To make upgrading pages to a new template a snap, it is important that you use the same editable region names in the new template that you used in the original. Using the same region names allows the content to flow seamlessly from the old template to the new one.

Let's first explore how to redefine a single page and then we'll see how to redefine multiple pages at once.

To redefine which template a page uses, employ one of the following methods:

  • Open the page and then from the document flyout menu choose Template > Apply Other Template > newtemplate. html, where newtemplate.html is the filename of your new template (Figure 136a).

    Figure 136a. Choose a different template to base the page on from the document flyout menu.


  • Open the page and then click the Template button in the Template Regions palette. Use the Fetch URL tool to point and shoot to a new template file in the templates folder of the Extras tab of the Site window (Figure 136b).

    Figure 136b. Use the Fetch URL tool from the Template Regions palette to redefine a page's template.


Redefining Components

You can use the In & Out Links palette to redefine components as well as templates. Follow the steps outlined for redefining page templates site-wide, but select the original component inside the Components folder found in the Extras tab of the Site window and then point and shoot to the replacement component.


In both cases, if the editable region names match, the new template is automatically applied. If you don't use the same region names in both templates, you get a dialog box asking you to choose an editable region from the list. This can be tricky because you can only select one region from the list.

To redefine the template used on multiple pages, use the In & Out Links palette as follows:

1.

Open the In & Out Links palette from the Window menu.

2.

Select the original template file by clicking it once. You should find it in the Templates folder in the Extras tab of the Site window. The In & Out Links palette will show all the pages connected to the old template.

3.

Use the Fetch URL tool next to the template name to point and shoot to the new template in the Templates folder (Figure 136c).

Figure 136c. Easily redefine the template used on multiple pages by using the In & Out Links palette.




    Adobe GoLive CS2 Tips and Tricks The 250 Best
    Adobe GoLive CS2 Tips and Tricks The 250 Best
    ISBN: B008CMGJS0
    EAN: N/A
    Year: 2005
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net