Understanding Dreamweaver - Using Templates 1

Templates 2 >           < DW Index

Templates Tab in DW MX


What are Templates?

A template is a pre-defined layout. These can be saved and used as the basis of new documents.

This document was made from a basic layout template which has been since modified. It simply consisted of the banner bar, an information bar and a body bar. By loading it from a template it gives a uniformity to the commonly used layout throughout the site and saves time trying to get the same colours and dimensions. By linking it to an external style sheet the text styles can also be rapidly imported.

All this template is editable as no content is required, but you can make all or some of a template fixed and non-editable. You can create templates from scratch or by converting an existing web page.

Why use Templates?

Templates can be made simply to save layout time and give uniformity to your site.

If your site has regular non editable areas eg company name and logo, using templates saves a lot of time and effort.

Technical Points

Templates can be fixed or they can be editable

Each template has its own file with .dwt file extension. They are stored in the templates folder.

Templates are entire Web pages, unlike Library items which are just parts of pages.

 

 

 


Making a new template

You must first have defined a site. Dreamweaver creates a templates folder.

You need the Assets Panel with the templates section displayed as below. This is
where you will create the template. Start with a blank page, but be inside your site.

  • In DWMX you can start your template 3 ways:

File/new – select Basic Page and HTML template from the righand pane


Make template from the Insert Bar /Templates tab – select Make Template icon.
You will beasked to give template a name


Go to Assets Panel and select Template from left hand menu and New Template from the
bottompanel. You will be asked to give it a name

  • Create each element of the page in turn (table, layer, image)
  • Now you must make each element of the page EDITABLE (so that you can alter the
    templatewhen you use it. Select one of them. There are two alternative ways to do this in
    MX
  1. Select the area to be editable. Now select Editable Region from the Insert Bar Templates
    Bar
  2. -Go to INSERT menu. Select TEMPLATE OBJECTS/EDITABLE REGION. The
    program willgive the region you have selected a name and place a marker on it. Repeat
    for each editable region


(IN DW4 the procedure is to create each region to be made editable and select it. Go to
MODIFYmenu and select NEW EDITABLE REGION)

  • Save in the normal way from file menu SAVE or SAVE AS TEMPLATE.

Making a page from a stored template

(1) In DWMX Go to File menu. Select New and select the TEMPLATES tab. Select one of the
templates already created(In DW4 go to File Menu NEW FROM TEMPLATE)

(2) A dialogue box opens as below. If you deselect the tick box you can make a new
documentbased on template but totally detatched from it. Otherwise changes in the
template will be reflected in document made from it.

 

Templates2> - more information on manipulating templates