Here's where all your work of creating templates and attaching them to content pages pays off.
After your site's fixed content and unique content are neatly divided among Dynamic Web Templates and attached to content pages, updating your site becomes a piece of cake. Depending on how you want to change your site, you can do so in one of three ways: Make and save changes to the Dynamic Web Template itself; attach a different Dynamic Web Template to a content page; or detach the Dynamic Web Template from the content page altogether.
If you want to change any of the fixed elements in your content pages, you simply need to open the attached Dynamic Web Template file, make whatever changes you want to that file, and then save it. Expression Web keeps track of which pages the template is linked to and automatically reflects the changes inside those pages (after checking with you first to make sure that you want to update them all).
For example, you may have attached a Dynamic Web Template to 20 content pages in your site. The Dynamic Web Template contains a number of fixed design elements that form the visual backbone of your site's pages, including a rather dated logo that was designed in the early 1980s. You decide to overhaul the company image by designing a new logo. To update all 20 pages in one attempt, you simply open the Dynamic Web Template file, replace the old logo with the new logo, and save the page. The new logo appears automatically in all the linked content pages.
You can change the template in any way you want. You can add or delete elements, and you can move, add, or remove editable regions.
To open a Dynamic Web Template, you can either double-click its icon in the Folder List task pane, or, with a linked content page open in Design view, choose Format Dynamic Web Template Open Attached Dynamic Web Template.
If your site uses several Dynamic Web Templates and you can't remember which is linked to what, take a look at the Dynamic Web Template report, which rounds up all the information in a useful table. To view this report, choose Site Reports Shared Content Dynamic Web Templates.
All Dynamic Web Templates must contain at least one editable region. If you delete an editable region in a template that, in linked pages, is filled with content, when you save the template's changes, Expression Web prompts you to move the content from the old region (the one you're deleting) to a different region in the page. If the region you're moving the content to already contains its own stuff, the two chunks of content merge and share that region.
For a more radical change of image, rather than make piecemeal changes to the attached template, you may want to create an entirely new template and swap it for the old one. Like changing outfits in a dressing room, changing Dynamic Web Templates enables you to "try on" different looks for a page without affecting the page's core content.
To swap Dynamic Web Templates, follow these steps:
Create a new Dynamic Web Template (follow the steps we provide earlier in this chapter).
Ideally, the new Dynamic Web Template should contain editable regions with the same names as the old template. That way, when you swap templates, Expression Web automatically funnels the content from the XYZ editable region in the old template to the XYZ region in the new template.
If the new template contains regions that are named differently, or if the template contains a different number of regions, the swapping process becomes slightly more complicated.
In the Folder List task pane, select the file or files to which you want to attach the new Dynamic Web Template.
To select more than one file, while holding down the Ctrl key, click the files' icons.
With the file icon or icons selected, choose Format Dynamic Web Template Attach Dynamic Web Template.
The Attach Dynamic Web Template dialog box appears.
In the dialog box, double-click the new template's icon.
One of the following three events then occurs:
The old and new templates contain equivalent editable regions: The Attach Dynamic Web Template dialog box closes, Expression Web attaches the selected template, and a Microsoft Expression Web dialog box pops up, letting you know that all is well. Click the Close button to close the dialog box. You're done!
The old and new templates contain different numbers of editable regions, or the regions are named differently: The Match Editable Regions dialog box appears, prompting you to map the regions between the current page and new Dynamic Web Template. If the regions correspond properly, click OK. The Match Editable Regions dialog box closes, and a Microsoft Expression Web dialog box appears, confirming that the content page has been updated. Click the Close button to close the dialog box. You're done!
The regions don't correspond properly: You must manually map the regions listed in the Match Editable Regions dialog box. Proceed to Step 5.
In the main area of the Match Editable Regions dialog box, click the name of the editable region that doesn't match correctly and then click the Modify button.
The Choose Editable Region for Content dialog box appears.
From the New Region list box, choose the name of the region you want, and then click OK.
The Choose Editable Region for Content dialog box closes, and the Match Editable Regions dialog box becomes visible again.
In the dialog box, click OK.
The Match Editable Regions dialog box closes, and a Microsoft Expression Web dialog box appears, confirming that the content page has been updated. Click the Close button to close the dialog box.
If you decide that a content page no longer benefits from its association with a Dynamic Web Template, detach the template. The good news is that all the fixed content contributed by the template stays inside the content page and is now completely editable, so you don't have to rebuild the entire page to have it match up with all the other pages in your site. The bad news is that if you later change the Dynamic Web Template (thereby updating all attached pages in the site), you must update the detached pages by hand.
Detaching a Dynamic Web Template is a one-way operation. The page inherits all the content from the Dynamic Web Template and continues its life as a normal page without any content provided from elsewhere. Make sure this is what you want before detaching a Dynamic Web Template from your page.
To detach a content page from a Dynamic Web Template, do this:
Open the content page that you want to detach from the Dynamic Web Template.
Choose Format Dynamic Web Template Detach from Dynamic Web Template.
Expression Web unlinks the two files, and a Microsoft Expression Web dialog box appears, confirming the action.
In the dialog box, click the Close button.