getting started
css and dreamweaver

home > dreamweaver > dreamweaver templates

dreamweaver templates

Once you have set out the page how you want it, you will need to save it as a template.

creating a template

  • Create a page, as described in the previous page
  • Go to "File > Save as Template"
  • Create a name for the template, but do not change the file extension - it must remain as .dwt
  • Dreamweaver automatically saves the template in a folder called /Templates
  • The template needs to have editable regions, so that pages created from it will be able to be edited
    • Select an area, usually a table cell, that will contain editable content
    • Go to "Modify > Templates > New Editable Region"
    • Name the region
    • Continue doing this until all your editable regions are formed
    • n.b.: It's best to keep this to a minimum, or it defies the point of having a template
  • It is also a good idea to use server side includes to help minimise download time and site maintenance

creating pages from the template

  • Go to "File > New from Template"
  • Select the template you wish to use
  • Go to "File > Save As" and save the file where the new page will live
  • Add content to the new page
  • If changes are made to non-editable areas of the template from which this page was created, Dreamweaver will ask if you want to update the page

applying a template to an existing web page

This information is relevant only when you have an existing html web page which hasn't ever had a template applied to it, or had a different template applied.

  • Open the page
  • From the top toolbar go Modify > Templates > Apply Template to Page
  • Choose the appropriate template
  • Dreamweaver may ask you where you would like orphaned content to go, if there is any
  • Select the editable area you want the content to go in
  • You may have to remove any extraneous content manually

n.b.: If the page you are applying the template to was hand coded, or created in another application, make sure the html is clean (free from font formatting etc) before applying a template

See also - adding meta tags to pages made from Dreamweaver templates