University of Rochester
   

Home
Web Help
Job Opportunities

IT Center
Class Tech
Computer Sales
Ed Tech
Site Licensing
Web Services


University IT Home

IT Notices

Policies

About Us

PMR

Leaders

Contact Us

Macromedia Dreamweaver - How To


Dreamweaver Templates

Dreamweaver templates has the ability to be used for all of your pages. Not only will the webpages have similar looks, it makes it easier to update as well. For instance, by using Dreamweaver template, it allows you to make a change on the template and then you have the choice to have Dreamweaver automatically make the same changes for all of the sites based on the same template.

  1. Open the document you want to save as a template:
    • To open an existing document, select File > Open, then select the document.
    • To open a new blank document, select File > New. In the dialog box that appears, select Basic Page or Dynamic Page, select the type of page you want to work with, and then click Create.
  2. When the document opens, do one of the following:
    • Select File > Save as Template.
    • In the Common category of the Insert bar, click the arrow on the Templates button, then select Make Template.
  3. Select a site to save the template in from the Site pop-up menu, then enter a name for the template in the Save As text box.
  4. Click Save.

    Dreamweaver saves the template file in the site's Templates folder in the local root folder of the site, with a .dwt filename extension. If the Templates folder does not already exist in the site, Dreamweaver automatically creates it when you save a new template.

Then you can insert an editable region:

Template regions can be inserted anywhere on the page.

  1. In the Document window, do one of the following to select the region:
    • Select the text or content that you want to set as an editable region.
    • Place the insertion point where you want to insert an editable region.
  2. Do one of the following to insert an editable region:
    • Select Insert > Template Objects > Editable Region.
    • Right-click (Windows) or Control-click (Macintosh), then select Templates > New Editable Region.
    • In the Common category of the Insert bar, click the arrow on the Templates button, then select Editable Region.
    • In the Name text box, enter a unique name for the region.
    • Click OK.
  3. You should also read the University template manual. This provides describes server-side includes that let you update only one page or text file and have all the changes occur on all of the pages. One way many people use the includes is for a navigation menu that is common to many pages.

A sample is to have a file called links.txt that contains the following links to pages in your site:

<font size="-2">
<A href="index.html">Home</A><BR>
<A href="about.html">About this Department</A><BR>
<A href="faculty.html">Faculty Members</A><BR>
<A href="events.html">Current Events</A><BR>
</font>
Next, you would put a line that says
<!--#include file="links.txt"--> 

into all of your webpages. What this does is tell the webserver to insert the file "links.txt" into the page from the directory where the file resides. You can also type

<!--#include 
    virtual="/College/Mysite/links.txt">

to make the include directive a little more flexible (if your site was www...edu/College/Mysite/), so your page can insert the links.txt from anywhere else on the webserver.

How to apply a template to an existing page

When you apply a template into an existing page, Dreamweaver scans the page for region names. However, since the existing page is not based on a template, there are no region names in the page. So, you should select the editable region of the template in which to place the existing content of the web page. Open up the page you want to apply a template, from the modify menu, select Templates, then click on Apply Template to Page. From the Site drop down list, select the site the template is located. Then in the Templates drop down menu, select Update page when template changes. Hit select. On the pop up box, you will see "document body", select it. Then Move content to new Region drop down menu, select an editable template region. After that, click on "Document head" and then choose from the Move content to new Region drop down menu as head. Click OK. You are all set.

What about detaching a page from a Template?

This is an easy task. Open the web page you want to detach from template, then click on the Modify menu and select Template, choose Detach from Template. The web page is detached from the template.

University Templates

Many users use the University Templates for their web site. Also, here are several of the templates in Dreamweaver template format.

To install these, make a directory called Templates in the folder on your computer where you keep your web pages. Move the downloaded template into this directory, and you should be able to select it when you choose New From Template from the File menu.

When you edit the templates to suit your needs, just open the template file from the Templates directory, make your changes, and then save it.

 

 

 

       

Text | Directory | Index | Contact | Calendar | News | Giving

Last Modified: Tuesday, 10-Jul-2007 10:13:35 EDT

11/8/05