Creating a Dreamweaver Template

 

You can create a template from an existing document (such as an HTML, Macromedia ColdFusion, or Microsoft Active Server Pages document) or you can create a template from a new, blank document.

 

After you create a template, you can insert template regions.  You can also set template preferences for code coloring and template region highlight color.

 

To create a template:

  1. Open the document you want to save as a template:

 

  1. When the document opens, do the following:

 

  1. After you creat the Template you have the option of inserting an editable region, repeating region, optional region and an editable tag attribute.

An editable region is an unlocked region in a template-based document--a section a template user can edit. A template author can specify any area of a template as editable. For a template to be effective, it should contain at least one editable region; otherwise, pages based on the template can’t be edited.

A repeating region is a section of the layout in a document that is set to repeat. For example, you can set a table row to repeat. Usually repeating sections are editable so that the template user can edit the content in the repeating element, while the design itself is under the control of the template author. The template user uses repeat region control options to add or delete copies of the repeated region in a document based on the template as necessary.

There are two types of repeating regions you can insert in a template: repeating region and repeating table.

An optional region is a section of a template that you specify as optional, to hold content such as optional text or an image that may or may not appear in a document based on the template. In the template-based page, the template user usually controls whether the content is displayed.

An editable tag attribute lets you unlock a tag attribute in a template, so the attribute can be edited in a template-based page. For example, you can "lock" which image appears in the document but let the template user set the alignment to left, right, or center.

Inserting an editable region

Before you insert an editable region, you should save the document you are working in as a template.

Note: If you insert an editable region in a document rather than a template file, Dreamweaver warns you that the document will automatically be saved as a template.

You can place an editable region anywhere in your page, but consider the following if you are making a table or a layer editable:

To insert an editable template region:

  1. In the Document window, do the following to select the region:
  2. Do one of the following to insert an editable region:

 

 Inserting contents to the template.

1.      A good place to insert the content you want is in your editable region.  You can copy and past the information.

Save templat as an HTML.

1.      After inserting the content, do the following:

Select File > Save as (file name desired) also make sure at the bottom of the save as dialog box it displays the category save as type:  All Documents (*.htm,*.html,*.shtml,*hta;…)

Linking to a specific place in a document

You can use the Property inspector to link to a particular section of a document by first creating named anchors. Named anchors let you set markers in a document, which are often placed at a specific topic or at the top of a document. You can then create links to these named anchors, which quickly take your visitor to the specified position.

Creating a link to a named anchor is a two-step process. First, you create a named anchor; then you create a link to the named anchor.

To create a named anchor:

  1. In the Document window’s Design view, place the insertion point where you want the named anchor.
  2. Do one of the following:

The Named Anchor dialog box appears.

3.      In the Anchor Name text box, type a name for the anchor, and click OK.

For more information, see

The anchor marker appears at the insertion point.

Note: If you do not see the anchor marker, select View > Visual Aids > Invisible Elements.

To link to a named anchor:

  1. In the Document window’s Design view, select text or an image to create a link from.
  2. In the Link text box of the Property inspector, type a number sign (#) and the name of the anchor. For example:

Note: Anchor names are case-sensitive.

To link to a named anchor using the point-to-file method:

  1. Open the document containing the named anchor you want.

Note: If you don’t see the anchor, select View > Visual Aids > Invisible Elements to make it visible.

  1. In the Document window’s Design view, select text or an image you want to link from. (If this is another open document, you must switch to it.)
  2. Do one of the following:

 

Informatin based on Using Dreamweaver Copyright © 1997-2003 Macromedia, Inc. All rights reserved
This is a picture of the feature being described. This is a picture of the feature being described.