How Dreamweaver Templates Work
How Dreamweaver Templates Work
This article describes how Dreamweaver implements templates. Technically, to use Dreamweaver templates, you do not get to know any of the knowledge given during this article; but it's handy to understand something about what is going on under the hood just in case you would like to troubleshoot a Dreamweaver template-based document.
Templates are a tool that's utilized in many computer applications including Microsoft Word, AutoCAD, and other office automation and style products. Templates are useful once you have a gaggle of documents that share many similar design features. You implement the common features just one occasion within the template, then just customize the template with the individual features of every document.
Templates are Used Only at Design Time
It is important to know that Dreamweaver templates are totally a design-time construct. Only two things separate a Dreamweaver template from the other HTML document:
1. Dreamweaver template documents have a ".dwt" extension.
2. Dreamweaver templates contain specially defined HTML comments that outline the editable and noneditable area of the template.
When you create an "instance" document that's supported a Dreamweaver template and store it on an internet server, the webserver is totally unaware that the document was supported a template. It treats the document an equivalent as the other HTML document and ignores the template comments within the document an equivalent because it would ignore the other comments in an HTML document.
Similarly, an internet browser would be completely unaware that a document was supported a Dreamweaver template, and would also ignore the template comments an equivalent because it would ignore the other comments in an HTML document.
Tag Syntax
Dreamweaver has two sets of tags:
* Template Tags are utilized in template files (files that have suffix .dwt).
* Instance Tags are utilized in the "instance" documents you create that are supported a template file ( files that typically have a suffix .htm or.
Dreamweaver defines about thirty different template tags, but all of them have the subsequent syntax:
<!-- TEMPLATE_TAG_NAME parameter_1="..." . . . . parameter_n="..." -->
where TEMPLATE_TAG_NAME and therefore the parameters are replaced with an actual template tag name and actual parameter names. for instance :
<!-- TemplateBeginEditable name="Region 1" -->
In the above example, the template tag may be a TemplateBeginEditable tag named "Region 1".
The syntax of instance tags is sort of similar:
<!-- INSTANCE_TAG_NAME parameter_1="..." . . . . parameter_n="..." -->
Tag Pairs
Many template tags are paired, having a gap and a closing tag. For example, the "TemplateBeginEditable" tag described above always starts an editable region that's ended with a "TemplateEndEditable". the 2 tags come as a pair, defined as follows:
<!-- TemplateBeginEditable name="..." -->
-- HTML Code goes here ---
<!-- TemplateEndEditable -->
How Dreamweaver uses Template Tags
One of the only and most vital things that Dreamweaver does with Template Instance tags is to define what regions of an instance document a document created supported a template document) are often edited. BUT BEWARE . . . If you employ Dreamweaver to open a template-based document in CODE VIEW, you'll edit any a part of the document in any way you please -- but this is often generally not an honest thing to try to to. within the Dreamweaver document design view, Dreamweaver respects the instance tags that are included during a document; for instance,
When you have finished editing your website, the Dreamweaver Instance Tags will remain in it, but as previously stated, these tags are ignored by your Web Server and your Browser.
Finally, if you update a template in Dreamweaver, all of the documents supported the template are going to be updated too.
Conclusion
Dreamweaver templates work by using specially defined HTML comment tags to mark regions of Dreamweaver template documents and instance documents. you ought to recognize Dreamweaver template and instance tags and understand what they are doing, but you ought to only edit them in Dreamweaver Design View, not in Code View. For more information on actually using Dreamweaver templates, see my upcoming article "Dreamweaver Tip: Build Better Websites Faster with Templates".
Beshop eCommerce HTML Template. Deliver the best online shopping experience with Beshop – the perfect eCommerce HTML template. Beshop enables you to reach the widest customer base, with a multipurpose, responsive design that performs seamlessly across mobiles, tablets and other devices.
Please visit our site: html template
No comments
Post a Comment