Creating and Applying Templates in Dreamweaver
Introduction Dreamweaver templates assist web designers in creating and applying a consistent page design and layout across a web site. Using templates also cuts down on site maintenance as changes to these items may be used to globally update the pages in your site. A Dreamweaver template is a document that you can use as the foundation for other web pages in your site. A template allows you to define overall site page layout and typically contains elements that will consistently appear on all web pages in your site, such as logos, navigation bars, placeholders for page title, regions defined for content, etc. There are two key definitions in any given template:
Certain elements in the template will be defined as editable, which means you will be able to change this element on individual web pages. Examples of elements that would typically change from page to page are content and the title of the page. You will need to define at least one region as editable in order to add or change that main content area on individual web pages created from a template. Non-editable items in your template are those that will remain the same on all the web pages in your site. These are the elements that, when modified in the original template, will be globally updated on the other pages in your site created from that template. Creating a Template In the following example, I started with a new Untitled document in Dreamweaver and inserted a table with 3 columns and 5 rows (some of which are merged cells) and set up the page layout as shown:
To define selections (objects) as editable, you need to:
To define regions (i.e. a table cell) as editable, you need to:
Other elements and regions not specifically defined by you as editable will remain non-editable. When you are finished laying out your template, you need to save it as a template:
In Dreamweaver, templates are assigned the .dwt file extension and are stored in the Templates folder within your local site. This folder is created automatically when you save a file as a template. The Templates folder and any templates it contains will be automatically uploaded to the web server when you a upload a web page created from a template or one that has had a template applied to it. Creating a New Page from a Template
![]()
Applying a Template to an Existing Page You can create a template at any point in the development of your site and apply it to existing pages.
Help with Templates Dreamweaver's Help feature offers a tutorial and in-depth information on how to create and apply templates. The Help feature may be accessed in Dreamweaver from Help | Using Dreamweaver. ITC Training Services offers 2 Dreamweaver workshops, Fundamentals and Advanced, as part of the Web Certification program. For more information on the program and workshop schedules, visit the Web Certification web page: http://www.itc.virginia.edu/training/webcert Macromedia Technotes on incorporating Templates in your web site:
Web
Development Support | General
Info | Getting Started
| Design & Promotion
If you need further assistance with Web applications or questions, send e-mail to web-consult@virginia.edu or call the ITC Help Desk at 924-3731. |
|||||||||||||||||||||||||||||||