Building Pages Based on a Template


Most of the time you will create new pages based on your template. This is the easiest and least confusing way to make templates work for you. It's also possible to take an existing page, say from an older site that you're completely redesigning , and apply a template to that page. That method is a bit trickier.

To make a new page from a template:

1.
Choose File > New.

The New Document dialog appears.

2.
Click the Templates tab.

The name of the dialog changes to "New from Template."

3.
Select your site from the "Templates for" list. Any available templates for that site will display in the Site column.

4.
Select the template you want from the Site column.

A preview of the template will appear in the dialog ( Figure 13.7 ).

Figure 13.7. If you begin a new page from a template with the File > New command, you must choose the site, then the template.


5.
Click Create.

A new page, based on the template, appears.

6.
Add content to the editable regions and save the new document with an appropriate file name and location in your site.

Tip

  • You can create a new page from a template faster once you get used to working with templates. In the Assets panel, click the Templates category, then right-click (Ctrl-click) on the template name and choose New from Template from the shortcut menu ( Figure 13.8 ).

    Figure 13.8. Fewer steps are involved in starting a new page from a template if you right-click (Ctrl-click) the template name in the Assets panel.


To apply a template to an existing page:

1.
Open the existing document to which you want to apply the template.

2.
In the Assets panel, select the template you want and click the Apply button at the lower left ( Figure 13.9 ).

Figure 13.9. Modify an existing page to fit into a template page by selecting the template and clicking the Apply button.


or

Drag the template from the Assets panel to the document window.

or

Choose Modify > Templates > Apply Template to Page. The Select Template dialog appears. Click a template in the list to choose it.

The Inconsistent Region Names dialog appears ( Figure 13.10 ). This dialog allows you to tell Dreamweaver in which region of the new page it should place the document's existing content.

Figure 13.10. When retrofitting an existing page to work with a template, you must decide where to put the content. The pop-up menu shows possible regions.


3.
In the Inconsistent Region Names dialog, do the following:

  • In the scrolling list, select an unresolved region.

  • Use the "Move content to new region" pop-up menu to select an editable region for the content.

If you choose Nowhere from the pop-up menu, the content will be removed from the document. If you click the "Use for all" button, all the unresolved content will be moved to the selected region.

4.
Click OK.

5.
The resulting document probably needs some cleaning up to work seamlessly with the template. For example, you may need to restyle some text, or move a bit of content manually. After that is completed, save as usual.

Tip

  • Dreamweaver expects the Templates folder to be at the top level of your site structure. Don't move it into a subfolder. If you do, Dreamweaver won't display the template files in your Assets panel or in the New Document template list.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

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