Sunday, February 5, 2012


This week in my web 2 class we learned how to create templates.  A template is a page that you want other pages in the site to be based on.  Templates make designing a site easier and all the pages are more uniform.  Creating templates is a two-step process. First, I created a page that I want all of my other pages to be based on; I saved the file as a template, and then created its editable regions. When a file is first saved as a template, you cannot build any new pages using the template until the editable regions are defined.  Dreamweaver creates a folder called templates that all templates are stored in.

The Templates directory is a very important directory and should not be moved or deleted as Dreamweaver is going to reference the files in this directory for all the pages are build off the templates.

Creating an editable region is really just as simple as highlighting the regions that you want to be able to change in your web pages and making an editable region out of them. Dreamweaver makes this so easy.  After highlighting the area that I want to change in all my pages I  went  to Insert >

Template Objects > Editable Region use the keyboard shortcut, Ctrl+Alt+V and when prompted named the area content1. All editable regions have to have a unique name; I called mine “content1” since this is where my main content will go on each page based on this template.

Any area can be made into an editable region.  I created two, header and content because that is all I want to change in each web page. 

To build a new page using the template all you have to do is go to file>new>page from template>create.  When the page opens save it as an html and make any changes needed. Below is a screenshot of one of the pages I created using my template.  Every thin at he top and on the right stays the sam and cannot be edited. 

No comments:

Post a Comment