skip to content

Dreamweaver Templates

What's a Dreamweaver Template?

Dreamweaver Templates is the reason why most folks start using Dreamweaver in the first place, and with good reason. Dreamweaver Templates (DWT) allow you to manage dozens, even hundreds of individual HTML pages through one document.

Since most pages in a website only differ slightly in appearance, DWTs hold all that information which repeats itself and lets you manage it from a single file.

A good example of these kinds of repeated elements would be a left navigation bar. The same bar appears on every page in a site, with the same links. Say you need to add a new link to that left side navigation. If you're not using a DWT, you'll have to open all the pages in your site and edit the code individually.

Humans are not wonderful at repetition. Opening and editing each page is prone to mistakes, errors and inconsistencies in code. DWT's are there to let machines take over this repetitive action, which is something machines are good at.

If your site is using a DWT, it's easy to change something like the navigation. You just open the DWT file, make your changes, save it, and the DWT automatically updates all the files that use it.

The same thing can be done for things like footers, headers, or attaching style sheets.

Simple Templates

The UConn Template package comes with 2 different types of templates, Simple templates and Nested Templates. A simple works just as we described above. One file, in this case simple.dwt, holds all the repeating information for a website. The navigation, the footer and header, etc.

Simple websites, as the name implies, are perfect for making simple websites of only a few pages. When your site uses a simple template, all the navigation on the top and left will be the same on every page.

Simple templates are less well suited to larger sites, so for those it's best to use nested templates.

Nested Templates

Nested templates are used in large sites, or sites that want the left navigation to change with each top navigation item chosen. an example of a page that uses nested templates is this one here. The links on the left are unique to the "Tutorials" section of this webtools site. If you choose Web Standards or Download Template from the top navigation, a different set of choices appear on the left, unique to that section of the website.

Nested templates are basically just templates within templates. For example, in the files downloaded with the UConn Template zip package, there are three nested templates: nested_master.dwt, nested_one_column.dwt, and nested_two_column.dwt

Just as a simple template controls the repeating areas among many html pages, a master template controls the repeating areas among many nested templates.

Take for example this Webtools site again. The master template we use here includes the header, the top navigation, and the footer. Then, we have a different nested template for each section. The nested templates control the left side navigation for all the pages that use it. All the pages you can click on the left right now use the tutorials.dwt to figure out their left-navigation, and the turorials.dwt uses master.dwt to figure out the top navigation, the header, and the footer.