Templates are a key feature of Adobe Dreamweaver, enabling you to control and update the appearance of an entire site. They are one of the features covered in detail on our Dreamweaver training courses. This article looks at how to set up, apply and modify templates. Templates facilitate site management by allowing you to modify and update several pages at once. A template is a web document (HTML, ASP, ASP.NET, etc. ) which contains a combination of locked elements and editable regions. When creating a new document, if you opt to base it on a template, the page will inherit all of the elements which the template contains. You individualise the page by modifying the content of the editable areas. If you later modify the template, all of the pages which are based on it can be automatically updated.
Templates can be created from scratch or you can take an existing document and convert it into a template. To create a template from scratch
1. Choose New from the File menu.
2. In the first column of the New Document window, click on New Template.
3. In the second column, specify the Template Type ((HTML, ASP, ASP.NET, etc. ).
4. In the third column, optionally choose one of Dreamweaver's preset CSS layouts or click None to start with a blank page.
5. If you choose one of the CSS layout, in the forth column, you must specify whether the necessary code is placed in the head of the document, in a new CSS file or an existing one.
6. Finally, click Create to generate your new template.
When you start using templates, Dreamweaver creates a special Templates folder which it stores in the root folder of the site. All templates are automatically stored in this folder. You can also take a regular HTML document and convert it into a template.
1. Open the document that you intend to convert into a template.
2. Choose Save As Template from the File menu.
3. Enter a name for the new template and click Save.
By default, all of the elements that you place on a template will be locked. They will appear on each page based on the template but will not be editable. To create the locked regions of a template
1. In the templates folder, double-click the name of the template you wish to edit.
2. Create all of the elements which you wish to appear on every page.
3. All of these elements will remain automatically locked and unchangeable on all pages based on the template.
4. If you save the changes you have made to the template at this point, Dreamweaver will remind you that you have not yet created any editable regions. Click OK.
Recent Posts |
No comments:
Post a Comment