Ads

How to Use Templates

You can use an Adobe Dreamweaver CS6 template to create multiple pages with the same layout. In a template, you control which page elements should remain constant in documents based on that template and which elements can be changed from page to page. Templates are helpful for building a website in which most pages have the same header, navigation system, and other elements. Using templates helps you save time as well as create and maintain a consistent look when more than one person is developing a site.

Creating a template

You create templates from existing pages, setting editable regions on these pages that will hold content on each page created from the template.

To create a template:

1. Start Dreamweaver.

2. Build a page that contains elements designed to appear on all content pages such as common graphics, a navigation bar, and common layout structures such as div tags.

Note: You may want to create navigation elements in Adobe Fireworks CS6 and export them as HTML documents.

3. Select File > Save As Template.

4. In the Save As Template dialog box, give the template a name. You can also enter a brief description of the template. Then click Save. If Dreamweaver asks if you want to update links, click Yes.

Dreamweaver creates a Templates folder in your site root folder and saves your template in that folder. Template files have a .dwt file extension.

To create an editable region:

1. In the Layout category of the Insert panel, click Draw AP Div, and then drag on the page to create a new div to represent the editable region in the template.

Note: You also click to indicate where to place the editable region, but using a div gives you more control over page layout.

2. With the div still selected, do one of the following to create an editable region:

• Select Insert > Template Objects > Editable Region.

• Right-click (Windows) or Control-click (Mac OS) the region and select Templates > New Editable Region from the context menu.

• In the Common category of the Insert panel, click the Templates button, and select Editable Region from the pop-up menu.

• The New Editable Region dialog box opens.

3. In the dialog box, enter a unique name for the region, and click OK. The editable region is within the selected div, and is enclosed in a light blue rectangle on the template.

Note: You cannot use the same name for more than one editable region in a particular template. Use only letters and numbers in the name.

4. Save and close the template.

Editing a template

You can edit a template at any time, even if you have created pages based on the template.

To edit a template:

1. Select Window > Assets. The Assets panel opens.

2. Click the Templates button on the left side of the panel. A list of the templates for your site appears in the lower pane. The upper pane displays a preview of the selected template. (You may need to scroll the preview pane to see this.)

3. Select the template you wish to edit and do one of the following:

• Double-click the name of the template.

• Click the Edit button at the bottom of the panel.

4. Edit the template in the Document window, changing non-editable elements or creating editable regions in the template as desired.

5. Save the edited template by choosing File > Save. The Update Template Files dialog box opens, with a list of the documents based on your template.

6. Click Update to update the documents based on the changes you made in your template. The Update Pages dialog box displays a summary of the updates performed. You may need to select Show log to view the Status information. 

7. Click Close.


     


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

buttons=(Accept !) days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !