Personal tools
  •  

DWMX Templates and Library

Document Actions
  • Content View
  • Bookmarks
  • CourseFeed

Dreamweaver MX Templates

One feature that will save you a lot of time is Dreamweaver's Template feature. If you have multiple pages in your site that use the same basic layout, you can create a template that includes the layout, along with editable regions to hold your different content. One great thing about templates is that if you modify the template, Dreamweaver will automatically update all the pages in your local site that use the template.

Review the following supplemental tutorial to learn how to create and apply a template.

If you need more information than these tutorials cover, refer to the Dreamweaver manual (the book or in the Help menu within Dreamweaver) or search the Internet for "Dreamweaver Tutorial."

Activity:

Create a template page for your site

For this activity, you may either create a new page to save as your template, or use an existing page that contains all of the layout and navigation elements that you would like to have on all your pages (recommended). It is also recommended that you use tables to lay out your entire page, with navigation elements in one cell, and the body of your page in another. This way, it is easy to select which parts of your page will be a part of the template (i.e. the navigation) and which parts will be editable when you create a new page based on the template (i.e. the table cell with the body content).

  1. Open a new document or open an existing document from which to create a template.
  2. If you are starting a new document, select "Template Page" from the "General" tab of the new document dialog box, and select "HTML Template". Click Create. This will create a new template file.
  3. Create a layout table and add your navigation elements and other elements that you wish to appear on every page. Save your page as template.dwt .
  4. For existing documents, go to File > Save as Template to convert it to a Dreamweaver template file, and save your document as template.dwt.
  5. If you are using an existing document, delete the body content from the page. (Don't worry, you saved it as a new file, so you aren't deleting the original content.)
  6. Click inside the main body content cell of your layout table.
  7. Create an editable region for the body (main content area) of your page . Go to Insert > Template Objects > Editable Region, and give a name to your editable region like " bodyContent ."
  8. Save your template by clicking File > Save, and close the document window.
  9. Open one of your existing pages, such as syllabus.htm.
  10. Go to Modify > Templates > Apply Template to Page. A dialog box will ask you which editable region you would like the content of syllabus.htm to go into. For each section of content listed, such as "Document Head" and "Document Body", select the appropriate section (such as the "bodyContent" editable region that you created) for the content to go in to.
    Template Regions
  11. Dreamweaver applies your template, and puts the original content of syllabus.htm in the editable regions of the template. You may have to delete some of the navigation elements that are repeated in the "bodyContent" region, so that all that remains is the main body content of the page.
  12. Save syllabus.htm (File > Save) and upload it to the server. View it in the browser to see how it looks.
  13. Now, when you need to change a navigation or other element common to all the pages, all you have to do is change it on the template file, and Dreamweaver will ask if you want to update all pages associated with the template, and then make changes to all the pages. Pretty convenient, huh?
Copyright 2008, by the Contributing Authors. Cite/attribute Resource . admin. (2008, May 20). DWMX Templates and Library. Retrieved January 07, 2011, from Free Online Course Materials — USU OpenCourseWare Web site: http://ocw.usu.edu/instructional-technology-learning-sciences/producing-distance-education-resources/resource21.html. This work is licensed under a Creative Commons License Creative Commons License
Online Degree Program
Utah State University offers an online masters degree program (MS & MEd) in Instructional Technology and Learning Sciences. Click below to find out more.