Even More Dreamweaver
Computing Resources >> Tutorials >> Web Development >> Even More Dreamweaver 

Evaluate this tutorial

 

Creating and Using Dreamweaver Templates

Making a Template in Dreamweaver

  1. Make your web page as usual with the basic structure of the site. This should be common to most of the pages in your site. Note: Don't put unique content in this page.
  2. Once you have created the structure, go to File and click on Save As Template, give a name to the template and click on Save.
  3. Notice the blue bar on top says <<Template>>. You now are in the Template. The template is automatically saved under a folder called templates. Note: You can create as many templates as you like. If you are using different layouts for different sections of your site, you can use different templates for each of the sections.


  4. Now you need to make parts of the template editable so that you can put in content and add information that is unique to parts of the site. As the main content of the pages will keep changing, let's make that region editable.

To make an area editable, you need your cursor to be in that location, and then right-click (Mac users Control + Click) inside the body column. Select Templates > New Editable Region, give an appropriate name; if you are successful, you will notice a light blue tag with the name of the editable region in your cursor's location.

You can continue to make changes, try different layouts, add new stuff etc. in the Template.

Using a Template in Dreamweaver

Once you have successfully made your Template, your job is not yet over. You still need to make sure that all the pages are using the Template so that when you update the Template, the pages using the Template will automatically get updated. Here are the steps to apply a template to a page:

  1. Once you have created a page with the same structure as the template, all you need to do is, go to Modify >Template > Apply Template to page.
  2. Once you have applied the specified template to the page, you will see the following window: 'Choose editable region for orphaned content.' Choose the editable region that you want the content to go into and click on OK. You will see that the template is in yellow and cannot be edited. The only region that is editable is the editable region you have specified in the template.

Note: You can apply the template before writing any content or after it. If you do it after writing the content, you need to choose an editable region where the content will go.

Updating a Template in Dreamweaver

Once you have made the template and applied it to all the necessary pages, the last step you need to know is how to update a template. This is the magic of using Templates.

Any changes that you need to make in the basic structure of the site, you need to do in the Template. So go ahead and make the changes and click on save. If you have applied the Template to any of your site pages, you will get a window asking you if you want to 'Update Templates used in the following files.' You must click on Update. If you click on Don't Update, none of the pages using the Template will get updated.

next section >

Watch the video

choose format/speed
dial-up | broadband
dial-up | broadband
dial-up | broadband

Tutorial Transcript

© 2003 Nadalia Yuehong Liu| iSchool | UT Austin | webmaster