- Using Templates
- Modifying and Creating Templates
- FrontPage Themes
- Dynamic Web Templates
- The Absolute Minimum
The page templates found in previous versions of FrontPage are simply a starting point for the page layout; once a page is created, the layout can be easily changed to the point that the template is no longer recognizable. Dynamic Web templates, which are new to FrontPage 2003, are different in that they enable you to create editable regions on the page, thus blocking access to areas such as the navigational elements while still enabling you to add and modify the content of, say, your main content area and your sidebars. Dynamic Web templates can also apply graphics, themes, and style sheets that aren't included in standard page templates.
Dynamic Web templates can save you from being your own worst enemy in that if you protect consistent content such as navigation bars and page banners, you can't add menu items that don't appear elsewhere on your site or insert the wrong site logo. As your site grows, this is likely to become a bigger issue than when you're first starting out. You'll be adding pages that might branch into directions you didn't anticipate when you first designed your navigation menu, and it's easy to forget that these additions need to be made consistently to old pages as well as future ones.
If you're a Web designer creating pages that might be edited by others, you can set the page banner, a copyright notice, and the site-navigation components in areas that can't be edited, leaving only the main content area free for changes. A practical example of this would be a commercial site where you design the layout and navigation, while another person adds the marketing content. The marketing staffer can go wild with the fancy prose while the navigation and other page elements are untouchable.
The other benefit of using this kind of template is that it remains attached to a page even after you've added content. Thus, you can update all the pages using that template at once simply by modifying the template, without disturbing the content on any pages that are using it.
Creating a Dynamic Web Template
A dynamic Web template starts as a basic page. If you create this page and immediately save it as a dynamic Web template, you won't have to worry about remembering to change the file format later.
To create a dynamic Web template, do the following:
Create a new page, using whichever page template suits your needs.
Select File, Save As. The Save As dialog box opens.
Click the Save As Type down arrow and choose Dynamic Web Template from the drop-down list that appears.
Type a name for the file in the File Name field. The correct file extension will automatically be added by FrontPage.
Click Save.
Once you've created the template page, design it just as you would any other page, adding elements or content that you wish to appear on all the pages to which the template will be attached. The best way to lay out your page is using tables. This will enable you to create your consistent content in certain cells and define others as editable regions.
Defining Editable Regions
A dynamic Web template is divided into editable and noneditable regions. You must define at least one editable region on a template before you can attach it to a page. To do this, perform the following steps:
-
Select an area on the page that should have unique contentusually a table cell or cells.
-
Choose Format, Dynamic Web Template, Manage Editable Regions.
-
In the Editable Regions dialog box, shown in Figure 3.10, give the new region a name.
-
Click Add.
-
Click Close to return to the document window.
Figure 3.10 The Editable Regions dialog box automatically contains a defined region for the page title.
Once you've created an editable region, it will be labeled and outlined in Design view, as shown in Figure 3.11. Be sure to save the template to preserve the editable region.
Figure 3.11 The label around the defined editable region won't show up when you publish the final page based on the template, but it serves as a guide when designing the template and attached pages.
NOTE
The title of a page is automatically defined as an editable region. This enables you to give each page of your site a unique title even if each page is based on the same dynamic Web template. To modify the title, right-click on the page in the document window, then choose Page Properties from the context menu and edit the Title field on the General tab.
Attaching a Dynamic Web Template to a Page
Once you've created a dynamic template and defined one or more editable regions, it's ready for use. To attach a dynamic Web template to a page, do the following:
Create a new page.
Choose Format, Dynamic Web Template, Attach Dynamic Web Template. The Attach Dynamic Web Template dialog box opens.
Select the desired dynamic Web template.
Click OK.
FrontPage will automatically place all the elements from the dynamic Web template on the new page. If the page already has content on it, you'll be prompted to determine which editable region should contain it, as shown in Figure 3.12.
Modifying Dynamic Web Templates
Aside from consistency and not having to reinvent the wheel on every page in your site, one of the biggest advantages of using dynamic Web templates is having the ability to change the entire site simply by modifying the template. To do this, open the template itself in FrontPage by selecting the .dwt file in the Folders view. Then, you can change themes, update a copyright year, or radically change the colors and graphics on a site to give it a whole new look. When you save the file, you'll be prompted to update all the pages to which the template is attached.
Figure 3.12 FrontPage will prompt you to put preexisting content into an editable region when you attach the dynamic Web template.
You can even modify the editable regions on your template. To add a new editable region, select the area and then choose Format, Dynamic Web Template, Manage Editable Regions, and then name and add the new region just as you did when creating the initial regions. To delete an editable region, again use the Manage Editable Regions dialog box, select the name of the region, then press Remove.
Editing Editable Regions with Care
When editing dynamic templates, you need to be careful with the editable regions. If you delete an editable region, you'll be prompted to find a new location for any content that's contained in those regions on pages created from the template. This includes any graphic or other elements in that region.
For example, say you have an editable region for a sidebar on your pages that contains a nested table with cells for the sidebar heading and the text below. If you delete the sidebar editable region in the template, you'll be prompted to move everything that was in the sidebar of each page into another region. If you elect to move this content into, say, the main body text of the page, the graphic heading and the table will appear along with the text itself. This can really mess up the formatting of your pages.