-
When you create a page based on a template, Dreamweaver creates an instance of the template that looks like a slightly modified copy of the template. If you look at the source code you will see several commented areas.
Dreamweaver uses these comments to identify editable regions and locked regions. Dreamweaver does not allow changes to be made in locked regions in a page that has an attached template. Amendments can only be made in editable regions.
- When dealing with templates, it is only the pages that are attached to the template that have locked regions. The template itself can still be edited in Dreamweaver*.
- Whenever you make changes to a template, Dreamweaver can automatically propagate those changes to every page that is attached to the template. This makes it an ideal tool for managing menus that appear on multiple pages.
- It is recommended that you use Dreamweaver Templates to manage the deployment and maintenance of menus on multiple pages in a website. When you put a menu in a template you only have to maintain a single copy of the menu and Dreamweaver takes care of updating all the pages that are based on the template.
- Dreamweaver stores templates in the Templates folder in the local root folder of a site. When you use a document-relative path in a template, Dreamweaver modifies the relative path when an instance of that template is created in a different folder.
- Menukit can handle templates and nested templates. Whenever it is
opened on a page that has an attached template or nested template,
Menukit displays a drop-down selection list on the Menu tab that lets you choose
which Page/template you want to work with.
For
example, the page you are reading, tutTemplatesReadme.htm, is attached
to a template, tutLayouts.dwt, which is in turn attached to another
template
toc.dwt.
In this case you could choose to create or maintain a menu in any of these places:
- in an editable region in the active page, tutTemplatesReadme.htm
- in an editable region in the nested template, tutLayouts.dwt
- in the template, toc.dwt.
- The tutorials in this section take you through:
- Editing a menu in a template directly using root-relative paths for the links.
- Editing a menu in a template directly using document-relative paths for the links.
- Editing a menu in a template indirectly - the template is attached to the active page.
Most of the time you need not be concerned about paths but you should at least be aware that document-relative paths look different in templates and in instances of the template depending on the relative positions of these in the site's directory structure.
You really only need to know this if you edit a menu directly on a template. If you use Menukit to process a template menu indirectly through an instance of the template then Menukit takes care of adjusting the paths for you.
When creating page stubs, if the active page is a template or an instance of a template then Menukit attaches the template to each page stub that it creates. This makes it very easy to create a complete navigable set of pages each with its own copy of the menu.
* Unless it is a nested template i.e. a template that is attached to yet another template and consequently also contains locked regions.

Print