Flylib.com

Books Software

 
 
 

Editing a Dynamic Web Template

Editing a Dynamic Web Template

In addition to completely changing your Web site using Dynamic Web Templates, you can also make small changes by editing the Dynamic Web Template itself. Any changes will automatically be applied to all pages that the Dynamic Web Template is attached to.

  1. Open the original Dynamic Web Template you created earlier.

  2. Change the color scheme and graphic.

  3. Save the template.

FrontPage will inform you if pages are attached to the template and ask if you want to update them as shown in Figure 20.12. If you click Yes, FrontPage will immediately update pages attached to the Dynamic Web Template. If you click No, you can update attached pages later by opening them and selecting Format, Dynamic Web Template, Update Selected Page.

Figure 20.12. When modifying a Dynamic Web Template, FrontPage will ask if you want to update all pages attached to that template.

graphics/20fig12.gif

This is similar to the way that FrontPage users have worked with shared borders in the past, but it is much more powerful and intuitive. Now you can easily make global changes of graphics, color schemes, and just about anything else in one easy step.

Detaching Dynamic Web Templates

If you want to remove the formatting applied by the Dynamic Web Template, select F o rmat, Dynamic Web Template, Detach Dynamic Web Template. All content for the page is preserved, including content provided by the Dynamic Web Template. After detaching the Dynamic Web Template, all content in the page is editable.

Changing Code in an Attached Web Page

As mentioned earlier in "Creating Dynamic Web Templates," any section of an attached page that is outside an editable region is protected. However, it is still possible to access the HTML source for protected areas of the page. When you do switch to a view of the HTML code for the page, any code outside an editable region will be highlighted as shown in Figure 20.13.

Figure 20.13. Code that exists outside editable regions is highlighted in Code view.

graphics/20fig13.jpg

If you change any of the highlighted code, FrontPage will display the Dynamic Web Template Alert dialog (see Figure 20.14) warning you that you have made a change to a non-editable region and informing you that it will be changed back the next time the page is updated.

Figure 20.14. The Dynamic Web Template Alert dialog will warn you if you make changes outside an editable region.

graphics/20fig14.gif

You have two choices at this point:

  • Always restore non-editable content while editing this page— FrontPage will always restore any changes you make to non-editable regions, and you will no longer be prompted when changing code in non-editable regions.

  • Keep all changes— FrontPage will keep the change that you made, but the next time you update this page, the settings from the Dynamic Web Template will be reapplied. If you don't want this to happen, you can check the Detach from Dynamic Web Template box.

graphics/troubleshooting_icon.jpg

If you are editing a page and you encounter a dialog telling you that your change cannot be applied because it is locked by a Dynamic Web Template , see " Cannot Modify an Editable Region Because It's Locked " in the " Troubleshooting " section of this chapter.


Troubleshooting

Developers Cannot Change the Title of Pages

graphics/troubleshooting_icon.jpg

I have attached a Dynamic Web Template to some pages, and now I cannot change the title of the page. What's going on?

When FrontPage saves a page as a Dynamic Web Template, it adds an editable region called doctitle that encloses the <title> tag of the Web page. This is done so that you can edit the title of the page. However, in some cases the doctitle editable region is not created. In those situations, the <title> tag is in a non-editable region and cannot be changed.

To resolve this issue, change the <title> tag in the Dynamic Web Template from this


<title>Page Title Here</title>

To this


<!-- #BeginEditable "doctitle" -->
<title>Page Title Here</title>
<!-- #EndEditable -->

This adds a new editable region called doctitle that surrounds the <title> tag and allows developers to edit the title of the page.

Make sure that you make this change in the Dynamic Web Template file and not the Web page to which the Dynamic Web Template is attached.

Cannot Modify an Editable Region Because It's Locked

I am trying to add a table to an editable region, and I'm being told that FrontPage will not accept my change because the code is locked by a Dynamic Web Template. Why is it doing that?

Certain edits are not allowed in an editable region, and inserting tables is one of them. You can change the size of text, whether the text is bold or italic, and the font, but you cannot perform any layout functions on that text (such as adding a table), and you can't apply any styles to that text.