<%@ Page Language="C#" Debug="true"%> Repeating Content on Pages with Dynamic Web Templates
Microsoft Office FrontPage 2003      
Developer's Toolkit
Resources | Links | Search
  extend design code  
             
  New Features
 
Microsoft® Windows® SharePoint Services
 
Microsoft® Office SharePoint Portal Server
 
Microsoft Office System
 
.NET Framework
 
 
Real world scenarios that fully expose great new functionality in FrontPage 2003 and Windows SharePoint Services.
 
 
  financial planning finance  
  sales & marketing sales & marketing  
  human resources human resources  
   
  FrontPage Developer's Toolkit > Windows SharePoint Services > Articles

Repeating Content on Pages with Dynamic Web Templates

Introducing Dynamic Web Templates

Most Web developers take great care to create Web sites that are easy to navigate. There are key ways in which Web developers can make navigating sites easier:

  • Provide consistent navigation on each page so that visitors do not have to re-learn where to click to find resources on the site on each page.
  • Make sure that the site look and feel carries through all pages on their Web site to provide a consistent experience throughout the site.
  • Make sure that the visitor knows what site they are on at all times, and that they know what page they are on in the site at all times. After all, not all site visitors start at the home page; some may follow links to secondary pages and skip the home page altogether, and site owners will want their branding visible no matter what page visitors link to.
  • Make sure that no matter what page visitors are on, they can easily find a way to get back to the home page.
  • Provide important copyright, terms of use, or contact information on every page in their site.

As sites get larger, with more and more pages, it becomes more and more difficult to maintain and update the pages to meet the navigational goals mentioned above. However, new FrontPage 2003 Dynamic Web Templates can make achieving these goals easier than ever even as the number of pages in your site grows.

Site header with company logo, key links, navigation bar
Left-hand navigation with links to all of the key areas in your site, including a link back to the home page. Page banner
 

Area open for editing
by authorized users.

Site footer with terms of use, copyright, and a contacts link

Dynamic Web Templates can be thought of as page templates that define areas that can and cannot be edited by authorized users, and that stay attached to pages so that they are kept continually updated when the Dynamic Web Template changes. For example, you could create a Dynamic Web Template that is similar to the design of your home page and includes your company logo, a link back to the home page, a series of link bars to link to key content on your site, a footer that contains copyright, terms of use, and contact information, and a page banner that tells the visitor what page they are on. If you then attach secondary pages to this Dynamic Web Template, they would all meet your navigational design objectives because they would have a consistent look, consistent navigation, a link back to home page, a consistent footer, and a page banner that tells the visitor where they are in the site.

Additionally, Dynamic Web Templates make working in teams easier. It is very common for one person or team to create and design a Web site, and then hand it off to content owners to manage. Content owners are often experts in their respective areas, but aren't Web developers so can get into trouble when given too many editing options. For example, it would be easy for a user to accidentally delete a link bar on a page or change the page's font to one they personally like, but when enveloped in a Dynamic Web Template, that link bar, and in fact the entire navigational area and other areas of the page, could be made off limits for edits. At the same time, the content owner still has the full range of control over the editable areas.

Dynamic Web Templates are HTML pages that can have virtually any design and are saved with the .dwt file extension. After Dynamic Web Templates are created, you define the editable regions and then attach pages to the them. When you make a change to a Dynamic Web Template, that change is then applied to all of the pages attached to it. You can choose what pages to attach to a Dynamic Web Template, and you can have more than one Dynamic Web Template in use in a site. Not all pages must use a Dynamic Web Template.  Therefore, Dynamic Web Templates give you a powerful way to meet navigational ease goals while minimizing the amount of maintenance work necessary. Dynamic Web Templates in FrontPage 2003 simply make managing sites easier.

Example

The Human Resources sample site contains 38 secondary pages. These secondary pages all have a consistent design and formatting because they are all attached to a common Dynamic Web Template. This Dynamic Web Template includes the company logo, a link bar on the top that provides links to commonly accessed Windows SharePoint Services pages, 2 custom Interactive Buttons, a series of links to key pages on the site in the Quick Launch area, and a page banner that automatically places the page title on the top of the page. This professional design was applied to all 38 pages in only a matter of minutes by attaching the pages to the Dynamic Web Template.

How to repeat content on pages with Dynamic Web Templates

Here are the steps to take to create a Dynamic Web Template and then use that Dynamic Web Template to change the look of pages on your site.

  1. Open FrontPage 2003 and then create a Web page with the design that you would like to apply to other pages. You can use FrontPage features like link bars, Interactive Buttons, page banners, and more.
  2. Save or rename your page with a .dwt file extension.
  3. With your Dynamic Web Template page opened, select the area that you want to make editable by users. For example, if this area is a table row or column, click Select on the Table menu, and then click Row or Column or Cell to select that area.
  4. Click Dynamic Web Template on the Format menu, and then click Manage Editable Regions. The Editable Regions dialog box opens.


     
  5. Type the name for this region in the Region name box, such as "content," and then click Close. The editable region is then displayed on the Dynamic Web Template page.

  1. Save the Dynamic Web Template by clicking Save on the File menu.

Now that the Dynamic Web Template has been created, and the editable region has been defined, pages can be attached to the Dynamic Web Template.

  1. Click the Web page you would like to attach the Dynamic Web Template to in the Folder List. Pages you attach to a Dynamic Web Template should have the .aspx file extension.

    Tip: You can select multiple pages to attach to the Dynamic Web Template to by using CTRLclick to select individual pages, or by using Shift + click to select multiple consecutive pages.
     
  2. Click Dynamic Web Template on the Format menu, and then click Attach Dynamic Web Template. The Attach Dynamic Web Template dialog box opens.
  3. Click your Dynamic Web Template file name, and then click the Open button. The Dynamic Web Template is then attached to all of the pages you selected. Each page can be opened and then edited in the areas designated as editable.

See it in action

The finance, human resources, and sales and marketing sample sites all use Dynamic Web Templates to repeat content on secondary pages.

Additional resources

Here are links to more articles about customizing sites created with Windows SharePoint Services.

  Applying a Theme to a Site Created with Windows SharePoint Services
  Customizing Themes for Sites Created with Windows SharePoint Services