Controlling page layout with Dynamic Web Templates

A Dynamic Web Template (DWT) is an HTML-based master copy of a web page that you can create to contain settings, formatting, and page elements such as text, graphics, page layout, styles, and regions of a web page that can be modified. When you attach a DWT to the pages in a site, that template defines the layout for those pages. You can use any number of DWTs in a site, and you can attach a DWT to as many pages as you like.

Important

To use DWTs, you need to first enable site management using metadata. For more information, see Add or remove metadata.

By using DWTs, you can create HTML pages that share the same layout. In addition to providing a shared layout, you can make some regions in a template available for editing while preventing changes to other regions in that template. This means that you can allow others to add and edit content, yet still preserve the layout of the pages and the template itself.

Because a DWT remains attached to the pages to which you have attached it, changes you make to the DWT are reflected in the pages. When you update the content in a DWT, you can update the attached web pages simultaneously.

If you choose to detach a DWT from your page, you do not lose any content in the page; however, any further changes you make to the DWT will not be reflected in your page.

Editable regions

Editable regions are those areas that you specify in the DWT as being okay for other writers to edit. When creating the DWT, you can enable other authors to add or remove event information in the regions you specify without having to worry that they will alter the page layout.

Editable region in Code view

<!-- #BeginEditable "Region1" -->
<p>(Region1)</p>
<!-- #EndEditable -->

Tip

In Design view, you can identify editable regions by the boxed areas on the page that include a tab with the name of each region.

See also

Tasks

Create a Dynamic Web Template
Attach or detach a Dynamic Web Template
Attach a different Dynamic Web Template
Update web pages attached to a Dynamic Web Template

Reference

Dynamic Web Template toolbar

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.