Master Templates in Dreamweaver, Part III

Return to page 1 of “Master Templates in Dreamweaver, Part III”
Adding Another Page to the Site
This may seem like a lot of work… and it is, but if you plan on adding a lot of pages to a site, the initial set up will pay you back in saved production time later. With a single template file controlling all of the pages of the site, it’s easy to add new pages to the site, complete with a look and feel that’s customized for a particular section.
1. Choose File > New. The New Document window appears. In the far, left column click the “Page from Template” option. The Site column lists all of the sites you’ve defined within Dreamweaver. The “Dreamweaver Templates III” site should be selected, and the template “design list” should be selected in the second column.
2. Click the Create button. A new template-based page appears (look at the yellow tab in the top-right of the document window to identify which template this page is based on.)
3. Choose File > Save and save this page as news_signup.html. By default this page is set as an “About Us” page, but it’s easy to assign this page to a different section of the site using the editable tag attribute feature discussed in the previous tutorial.
4. Choose Modify > Template Properties. The Template Properties window appears (refer back to Figure 3 if you need a reminder). Notice that there are only two items listed: page id and quoteBox. The optional regions you just added aren’t listed because they are controlled by whatever you supply for the page id value. Currently it’s set to “about”, but that’s easy to change.
5. In the text field at the bottom of the window, change “about” to “news.” Click OK. Notice that not only does the page’s color scheme change (you learned that trick in the previous tutorial), but the links for the “About Us” section have been replaced with links to the newsletter forums. At this point, you’d title the page and add content to it, but since this is just a tutorial, we’ll skip that part. (You can find a completed version of the tutorial in the folder templates_site3_finished.)
As you can see, optional regions provide yet another way to customize template-based pages and avoid the cookie-cutter look of a basic template.
Now the template file contains content for multiple sections of the site. If you need to update the list of links for a page in the “About Us” section, you merely open the template, edit the links in the optional region, and save the template file. All of the “About Us” pages will then update.
The same process works for modifying links in the “Newsletter” section. And, of course, you can change the main navigation bar at the top of the page and update the entire site.
One template to rule them all!
This article was last modified on January 8, 2023
This article was first published on August 5, 2009
Hi Dave,
thank you very much for this very helpful tutorial.