Modifying a Template


The use of a template makes it very easy to build multiple pages using the design of your original template. The person creating the page can just add the content that changes from page to page, but can't make changes to any of the locked areas.

The real time savings come when you need to make changes to all the pages that were built using the template. Without a template, you'd have to edit each page. With the use of a template, you simply edit the original template file to update all the pages built with the template.

1.

In the Templates category of the Assets panel, double-click the teacher template.

The original template you created earlier in this lesson opens.

2.

Place the insertion point within the sidebar navigation text Katchie Ananda and use the Property inspector to change the link to Katchie.html. Change the link for Jayne Hillman to Hillman.html and the link for Darcy Lyon to Lyon.html. Save the template.

Click OK to accept the warning message about the editable region within a block tag. Then, because you made changes to the template, the Update Template Files dialog box opens, displaying a list of all the files that were built from this template.

Tip

When creating your own Websites, you can choose Don't Update if you want. You can later update the pages by choosing Modify > Templates > Update Pages.

3.

Click Update to modify all the pages with the changes you just made. Close the Update Pages dialog box after examining its update log.

The Katchie.html, Hillman.html, and Lyon.html documents that you created earlier from the template are all updated with the new links. The ability to update all pages associated with a template can be very useful. If you have a navigation section of the template with links (like the Yoga Sangha pages you're working with), you can set those in the template. If the links change, you simply change the template, and all pages designed with the template are updated.

Note

You can detach a page from a template by choosing Modify > Templates > Detach from Template. A detached page is completely editable, but it no longer updates if the template changes. You can also uncheck the Update page when template changes checkbox on the New Document dialog box to create a copy of the page, completely independent from the template. This procedure creates a page that functions much like stationery and does not have any template markup. Pages created in this manner don't update if the template changes.

4.

Open the Katchie.html file and preview it in the browser.

The sidebar links on this page should now point to their corresponding pages, as will those on the other two pages created from this template.

Note

If you want to create content that is controlled by Cascading Style Sheets (CSS), covered in Lesson 4, you can use an external style sheet to make it possible to update the style sheet without having to update the template.





Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net