Template Concepts

 
Home
Intro to Templates
   SSI
   Template Concepts
Using STT
Obtaining STT
Contact

 

 

 

 

Hosted By
SourceForge.net Logo
  A template is a document that serves as the foundation for a collection of web pages. It contains special commands which designate which regions of the page can be changed (these are called "editable" regions); any part of a page outside one of these editable regions is constant (noneditable) and will be identical in all pages that use the template.

Some web design programs provide support for templates. DreamWeaver is one particularly popular example. When designing a web site with DreamWeaver, you can use DreamWeaver's editing capabilities to design a template for a collection of pages. When editing one of the individual pages that use the template, DreamWeaver "locks out" the regions of the page that are controlled by the template, so that you can only change the editable regions in the page. If you want to make a change to a part of the page that is outside an editable region, you change the template itself. DreamWeaver then automatically updates all the pages that use the template, so the pages all stay consistent with the common layout defined in the template.

In this style of templating, although the common parts of a collection of pages are stored in a separate template file, the individual files that use that template are complete HTML files that you can edit or preview as a unit. Each of them actually includes an entire copy of the template, with different content in its editable regions. This might seem to violate the principle of eliminating duplicate code, but the important thing to remember is that you only have to maintain one copy of the common code --- the template itself. Whatever software you're using to apply the template to the individual pages handles the duplication for you. This give the advantage of having a single source for your design, combined with the convenience of having each page be complete.

If you create web pages using web design software like DreamWeaver that supports templates, you can start using templates immediately. Many people and organizations, however, don't have such software easily available, either because of the expense, or because of the training required to use it. STT is a free software package that provides a templating capability similar to DreamWeaver. It can be used in situations where DreamWeaver, or some similar template-supporting web design software, isn't available.