![]() ![]() |
![]() Using the Sample Dreamweaver Templates and Libraries Dreamweaver templates make it easy to create sites with a consistent design, as well as to update multiple web pages simultaneously. You can apply templates when you create a document or to an existing document. Libraries are collections of items such as images and movies that you want to reuse throughout your entire site. You can use library items with templates and documents to simplify your site maintenance. When you want to edit an item in your library, you can do it once, and tell Dreamweaver to update that item throughout your site. In this article, you'll learn how you can create documents using the sample templates, as well as how to modify and reapply them to your web pages. You'll also learn how to add an item to your library and use it in your site. This articles uses the K-5 sample templates to demonstrate the examples. However, the procedures can be applied to any template.
Dreamweaver templates are linked to the documents you create with them, unlike word processing templates. When you update a template, you can tell Dreamweaver to update all the documents based on that template with your changes. By using templates to create your web pages, you can quickly and easily update multiple pages at the same time. For example, suppose you run a daily magazine on the web and you want to use the same layout (masthead at the top, address at the bottom, and so on) for every issue. You create several issues by generating hundreds of pages based on this one template. Later on, you decide the masthead isn't prominent enough, so you move it to the lefthand side. You can do this once in the template; when you save the template, you can choose to update all the documents that use this template simultaneously.
To use the sample templates in a new site:
When you first open a template, the editable and locked regions are highlighted with different colors. |
![]() |
|
![]() |
|
![]() |
How to apply your new template to an existing web page If you've already created documents using a different template or no template at all, you can still apply your new template to the existing pages. For example, suppose you downloaded the sample templates into your new site. You can apply one of the templates to one of your documents, regardless of whether the document was created with a template. To apply a template to a document:
|
![]() |
|
![]() |
Editing a template and updating your documents You can edit a template and update the documents that use the template. For example, suppose you want to change the font style of all the headings in your site and you have ten documents in your web site that use the same headings. You can update your template once, then tell Dreamweaver to update all of those documents. To update your template:
|
![]() |
|
![]() |
The K-5 templates already contain editable and locked regions, but you can create more editable regions if you want. You can also lock an editable region if you want a particular section to stay static after you've made your changes. You can determine if a region is editable by looking at the color highlighting. To create an editable region:
Detaching a document from its template Detach a document from a template if you want to isolate the document from any further changes to the template. For example, if you want to update ten out of eleven documents that use that template, you can detach the single document and update the other ten simultaneously. To detach a template:
See also "Detaching a document from a template" in Dreamweaver Help.
We've included library items with the sample templates, so if you've set up a sample template, just choose Window > Library to preview the sample library items. For example, you can open the K-5 site and choose Window > Library. In the Library palette, you should see the address library item. See also "Reusing page elements" in Dreamweaver Help. To create a library item:
Modifying a library item After you've added an item to your library, you can always modify it for a template, specifically for the current document, or for all the documents that use the library item. The steps are pretty much the same, regardless of what you want to do. To modify a library item:
When you update a library item and choose to update the pages in your site, Dreamweaver distributes the changes to all instances of the item in documents and templates throughout your site. To modify a library item specifically for the current document: Select the library item in the document and click Make Editable in the Property Inspector.
|
||||||||||||||||||||||||||||||||||||||||||||||||