Saint Mary's College - Notre Dame, Indiana

Instructional Technology Resource Center - Saint Mary's College - Notre Dame, Indiana
 
 

Using Templates in Dreamweaver 4.0

How to MAKE a template

  • Create a new page.
    NOTE: All Templates must be made with the layout tables!
  • With the new page, make a new table (with the GREEN layout table button found under "Layout" in the picture to the left).
  • After you insert this main layout table, begin inserting layout cells with the images and navigation bars that you would like to add to your template.
  • Be sure that when you do this, you have the margins set to the desired measurement.
    After you have inserted all of these into your page, you must save the page as a template.
  • You can do this by going to FILE>SAVE AS TEMPLATE.
  • After you save it as a template, you must include the EDITABLE REGION.
Including an Editable Region
  • The EDITABLE REGION is the most important part of your template. That is where all the information will go when you attach this template to a new page you are creating.
  • To create the editable region, you need to create a layout cell in your template where you want the content to appear.
  • After you have created this cell, click on the outside of it to highlight the entire cell.
  • After the cell is highlighted, go up to the MODIFY menu and then down to TEMPLATES. Then choose NEW EDITABLE REGION. The following will appear on your screen:


    • Type in the name of the newly created editable region. I usually call mine "Body."
    • That is the final touch to your template. Save the template one more time.

How to USE your Template

After you have created a template, the next step is incorporating it into new pages. There are two ways to do this. One is by going FILE>NEW FROM TEMPLATE, or the other is to create a new page, and then attach the template later.

NEW FROM TEMPLATE

  • Go up to the FILE menu and select NEW FROM TEMPLATE.
  • Then, you will see a page come up with your template incorporated already, and the cell with the editable region that you named when creating the template.
  • Put your cursor into the editable region box, and begin entering the content for your page.
    NOTE: Notice that as you enter the content, a light-teal colored box appears around the text and there is a tag on it that says the name of the region (in my example it says Body). This box only appears in Dreamweaver and does not appear when viewing the page on the web.
  • After you enter the content into the editable region, save your page as you would normally and you are finished.

Attaching Templates to New Pages

This is a great way to change pages when they are already created. If you have already created a website and would like to change the layout by adding a template, this is the easiest way to do it!

  • Go up to file and create a new page (as you would do with a normal page).
  • Insert the content onto the page as you would like it to appear within your editable region of your template. Do not worry about spacing quite yet, as it will change a little when you attach the template.
  • After you have entered all your content, save the page in the normal way.
  • Now, go up to MODIFY, then down to TEMPLATES and choose the APPLY TEMPLATE TO PAGE option. The following will appear on your screen:


    • Select the template that you have created that you wish to apply to the page.
    • After you select the template, press on the SELECT button to the right of the menu, and the template will attach to the page.
    • After the template is attached you can finish formatting your text or images that are in the editable regions to make them more aesthetically pleasing to you.

How to Make Changes to Your Template

  • To make changes to your template, simply go FILE>OPEN and go into the TEMPLATES folder that was created when you saved the template.
  • Select the template you wish to make changes to, and make the desired changes.
  • When finished, save the template. When you save the template the following will appear on your screen:

  • This menu asks if you would like to update the files that use the template. Select UPDATE and the pages that use the template will be changed.