Dynamic Web Templates use editable regions to separate areas that can be edited from areas that are protected. Any content outside of an editable region is protected and cannot be edited. An editable region can be located anywhere on a page, but for the most control over the location of an editable region, you can place it in a table cell. FrontPage will allow you to save a Dynamic Web Template before any editable regions are added to it, but FrontPage won't let you attach that template to a page until you've created at least one editable region (see Figure 20.1). Figure 20.1. Before applying a Dynamic Web Template to a page, you must first add one or more editable regions to the Dynamic Web Template.Design a Layout for the Dynamic Web TemplateYou begin by creating the layout for your Dynamic Web Template inside of a normal Web page. Your Dynamic Web Template can be formatted using any page elements you choose. In this example, you will use a table to format the template:
You'll use this simple table as the layout for a Dynamic Web Template you'll use as you read this chapter. As shown in Figure 20.3, you are going to allow people editing your site to edit the left column, but you're also going to have some navigation elements there. Therefore, you'll only allow people to edit below the existing navigation buttons. You will also allow people to place main content into the center column, but you'll have some copyright text at the bottom of the column that no one will be able to modify. Finally, you'll allow developers to add content freely into the right column. Figure 20.3. This page will be saved as a Dynamic Web Template and will control where content can be edited.Adding Static ElementsTo implement this Dynamic Web Template, you will need to enter three editable regions, but first you'll need to add the content that you want to remain static and uneditable. Click inside the left column and add a few Interactive Buttons for your navigation. Press Enter after each button so that each button is on its own line, as shown in Figure 20.4. Figure 20.4. These Interactive Buttons will be locked inside of an editable region.Click inside the center column and enter some copyright information. This text will also remain locked when editing this template. Anything inserted at this point is outside of an editable region and will be locked when the Dynamic Web Template is attached to a page. Creating Editable RegionsBefore you create editable regions in the Dynamic Web Template, first save the template.
You now have three editable regions in the template. You might have noticed that FrontPage had already created one editable region for this page called doctitle. The doctitle editable region allows developers to change the title of pages to which this Dynamic Web Template is attached.
The borders of the editable regions are indicated by an orange line around them. After you attach this Dynamic Web Template to a Web page, content can only be added inside these editable regions. Anything outside the editable regions will be protected. TIP You can also make a section of a paragraph an editable region. For example, you can make the year in your copyright statement an editable region so that it can be changed each year while the rest of the copyright statement stays protected. The completed Dynamic Web Template is shown in Figure 20.6. Now that you've created a Dynamic Web Template, you are ready to attach it to a Web page. Figure 20.6. A completed Dynamic Web Template ready to be saved and attached to a page. |