Creating a Template in Dreamweaver

 < Day Day Up > 

In Fireworks, you created the template.png file and used that file as a starting point for the new files you created. That file contained the buttons and logo that you wanted to use on all of your pages. By creating new files from that file, you were able to create your new pages quickly and with the assurance that all of the buttons were the same.

In Dreamweaver, you can create a template that you can use to rapidly produce pages with the same design elements. You can define certain areas of the template as editable; all other areas then are locked and can't be edited. Locking areas ensures that the page design remains constant across all pages.

In this exercise, you will create a Dreamweaver template from the template.htm file you created in Fireworks. Then you will use that template to create recipe pages.

1.

Open the template.htm page in Dreamweaver if it is not already open. Choose File > Save as Template.

The Save As Template dialog box opens. Here you see any existing templates for the site. The current site (Sweet Creations) is selected.

2.

In the Save As text box, type recipes and then click Save. Click Yes to update the links if asked.

Your file is saved as a template. When you save a document as a template, Dreamweaver automatically inserts code that locks most regions of the document. You then need to identify the areas that you want to make editable. When you are editing the template, you have control over the entire document. When you are editing a page based on the template, you can modify only the editable regions of the document.

Note

Dreamweaver creates a Templates folder in your local site folder and saves your template file with a .dwt extension in the Templates folder.

3.

Click within the large empty cell in the document and then choose Insert > Template Objects > Editable Region.

This area is defined as an HTML slice in Fireworks; you want to make it the editable region of this template.

Tip

You can also right-click (PC) or Control-click (Mac) and then choose Templates > New Editable Region from the context menu.

4.

Type content in the Name text box of the New Editable Region dialog box and then click OK.

Note

The name you enter must be unique; you can't have the same name for multiple regions of a template. You also can't use quotation marks (single or double), angle brackets (< >), or ampersands (&) in the name.

A rectangle in the upper-left corner of the region displays the region name.

5.

Save and then close the template page.

Note

Click No if you get a message asking you if you want to update all documents in your site. At this time, you've only created the template and have not used it to create other pages.

     < Day Day Up > 


    Macromedia Fireworks 8(c) Training from the Source
    Macromedia Fireworks 8: Training from the Source
    ISBN: 0321335910
    EAN: 2147483647
    Year: 2005
    Pages: 239
    Authors: Patti Schulze

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