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

Chapter 17. Automating Dreamweaver > Attaching an Existing Page to a Template

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:

1.
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 17.82).

Figure 17.82. Select the template to which you want to attach the page.


2.
Select the name of the template that you want.

3.
To automatically have this page updated when you edit the template, leave the check box checked. For more on updating, see Updating Your Site, later on.

4.
Click Select.

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

Figure 17.83. In the Inconsistent Region Names dialog box, content not yet assigned to an editable region must be resolved.


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 17.84).

    Figure 17.84. If you're applying a template to a page already formatted by a different template, select each region name in turn from the old template and apply a region from the new template by selecting it from the drop-down menu.


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

    Figure 17.85. The Move Content to New Region drop-down menu lets you temporarily place all your unmarked content in an editable region on the template. If you're transferring renamed editable attributes, you'll see their equivalents listed here.


  • 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 one 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 Use For All.

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

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


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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