Adobe Dreamweaver templates are one of the most powerful development aids that the program contains. Basically, a template is a master design which can be copied repeatedly to generate an limitless number of web pages each one containing the same shared elements. Obviously, each time the template generates a new page, the page can be customised and the requisite elements added to it to make it unique. This is achieved by a technique of locked page regions and editable regions.
When the template is applied to a page, locked regions cannot be modified. (You have to return to the template to alter them.) Only the areas of the page designated as editable regions can have content added to them.
To create editable regions on the template, you simply position the cursor in the required area of your layout and choose Insert – Template Objects – Editable Region. Enter a name for the region and click OK. One frequent problem experienced by new users of Dreamweaver is the accidental placement of and editable region inside a heading or paragraph tag. This means that when the template is applied to a page, only text can be placed in the editable region. To remedy this problem, return to the template, click in the editable region and examine the Tag Selector on the left of the Status bar. Having located the offending tag (usually h1, h2, p, etc.), right-click on it and choose Remove Tag from the context menu.
To apply a template to a page that already exists, open the page and choose Modify – Templates – Apply Template to Page. Next, double-click on the name of the template you wish to apply to the page. Strangely enough, there is no Dreamweaver command that enables you to apply a template to several pages at once. However, here are two suggestions for applying a template to multiple pages reasonably quickly.
Begin by selecting multiple pages in the Files panel using the classic techniques of Shift-click or Control-click (Command-click on a Mac). Then, you can right-click one of the selected files and choose Open from the context menu to open all of them. Next, activate the Assets panel (Window – Assets) and click on the Templates button (the second icon from the bottom). Finally, drag the icon of the required template onto each of the open pages. To speed up the process, use Control-Tab to switch from page to page.
To create a brand new page based on a template, choose New from the File menu and, when the New Document window appears, select the Page From Template option, click on the site that contains the template (It should already be highlighted.), then choose the template. To get the most benefit from a template, before clicking the Create button, make sure that the option “Update Page When Template Changes” is activated.
Author’s company offers Adobe Dreamweaver courses in London