• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 14. Using Dreamweaver Templates ... > Attaching an Existing Page to a Temp...

Attaching an Existing Page to a Template

You can attach existing pages to a new template, too. You have to choose a single region to dump all the content into, though, unless the page has similar marked regions.

To attach a page to a template:

Open the document to which you want to attach the template. From the menu bar, select Modify > Templates > Apply Template to Page. The Select Template dialog box will appear (Figure 14.57).

Figure 14.57. You can attach a template to existing pages.

Select the name of the template that you want.

To automatically have this page updated when you edit the template, leave the checkbox checked. For more on updating, see Performing Routine Updates, later on.

Click on Select.

If the document contains content that can’t be assigned automatically to an editable region, the Inconsistent Region Names dialog box will appear. (Figure 14.58).

Figure 14.58. This dialog box indicates Dreamweaver can’t readily figure out where to put your content.

Because templates only allow new content to appear in editable regions, you need to select an editable region in which to stick your content. You’ll be able to move it from region to region once the page is reopened, but for now, you have to pick one.

  • For region names coming from one template to a different one, select each region name in turn and apply a region name from the current template by selecting the new region from the Move Content to New Region drop-down menu (Figure 14.59).

    Figure 14.59. You can assign a region to content from a different template.

  • For visible content, select Document body and then select a region from the Move Content to New Region drop-down menu.

  • For head content such as scripts and CSS, select doctitle from the menu to transfer those items to the head tag; or Nowhere to discard the head content. (This is a sneaky way to get extra CSS and scripts into a template-based page.)

  • To discard content, select Nowhere from the drop-down menu.

  • To drop all your content into the same region, apply content to one region and then click on Use For All.

When all your content is taken care of, click on OK.

When the dialog box closes, your content will appear in the region you selected. You can edit your page now.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint