Skip to the content of the web site.

Applying Templates to Your Pages

There are a variety of approaches that you can take to applying your new template to the pages of your web site.

Most of the discussion below is aimed at people who are using a Dreamweaver Common Look and Feel template. However the principles are the same for people using any standard XHTML dreamweaver template, or to people who have a blank "starter page" on which they will base all other pages.

Creating New Pages

You will probably discover that you need to create a number of new pages for your web site because of the navigation structure. Simply create new pages based on the template, select appropriate template properties, and enter your content.

Copying and Pasting From Existing Pages

In either Dreamweaver or Contribute, you can create a new page based on your template and select appropriate template properties. Then, with the appropriate page open in your browser, you can copy its contents, and paste it into your Dreamweaver or Contribute document. This will work well if the page contains only text. However if you have links on the page, or images, problems may arise. References to internal links and images will be expanded to their full URL, and this may not be desirable for a variety of reasons.

Opening The Page in Dreamweaver and Applying the Template

If Your Pages Were Not Created With a Template

If your existing site was not created with a Dreamweaver template, it is a simple matter to apply a template to a page. Open the page in Dreamweaver, and from the menus choose Modify -> Templates -> Apply template to page. You will be asked to select the appropriate template. Then a dialog box will appear, asking you to assign document content to the appropriate editable regions of the template.
Template regions dialog box

Select the "body" line, and from the "Move content to new region:" dropdown, select "primary content".
Template regions dialog box

Now select the "doctitle" line, and from the dropdown choose "pagetitletag".

Template regions dialog box

Click OK. The template will be applied.

If Your Pages Were Created With a Template

If your current site was created with a Dreamweaver template, there are two approaches you can take.

The first approach, which is suitable for a website with only a few pages, is to open a page and detach the current template. You do this by choosing from the menus Modify -> Templates -> Detach from template. Then follow the above steps to attach the new template.

The second approach, and the most common approach, is to apply the new template to all files in your site that were created with an older template. To do this, open your new template in Dreamweaver, and do a File -> Save As and save your new template with the same name as your old template. A dialog box like the following will appear, asking if the listed files should be updated.

Updating your template

Click the Update button. The dialog box identical to the one above will appear.

Template updates

Follow the instructions given above to apply primarycontent to body and pagetitletag to doctitle. Click OK. You will receive a box indicating which files have been updated.
Template updates

Click Close. Your new template has been applied to your site.