DekGenius.com
Previous Section Next Section

20.1 Customizing the Default Document

New, blank documents are actually based on a default document template; therefore, any modification to the document template affects every newly created document. You can modify the default document template to reflect the basic page design of your site. If you work on multiple sites, you may prefer to create custom templates for each one (see Chapter 8).

Dreamweaver's default document template is stored in the file named Dreamweaver4/Configuration/Templates/default.html. Prior to overwriting your default document template, make a backup copy, rename it to old_default.html, and store it in the same folder as the original. Then open default.htmlin Dreamweaver (use File figs/U2192.gif Open, not File figs/U2192.gif New From Template).

As you can see in Figure 20-1, the default document template includes <title>, <head>, and <meta> tags, and an empty <body> tag. It uses a white background and black text.

Figure 20-1. The default.html Dreamweaver document template
figs/dwn_2001.gif

Edit the default.html file as you would any HTML file; add any content that you want to include in all documents (text, images, or stylesheet information). If you work on multiple sites, make only changes that are common to all sites. After you customize default.html and restart Dreamweaver, every newly created document will inherit your changes.

Figure 20-2 shows a new document based on a modified template. Note the copyright notice, a meta tag that identifies the developer, and the modified text and background colors.

Figure 20-2. Document based on revised template
figs/dwn_2002.gif

Although the changes shown in Figure 20-2 are minimal, you can make much more elaborate changes, as shown in Figure 20-3. Save your changes to the default document template using File figs/U2192.gif Save, not File figs/U2192.gif Save As Template.

Figure 20-3. Document based on extensively modified template
figs/dwn_2003.gif

Remember that you can save any file as a template using File figs/U2192.gif Save As Template and then base a new document on the template using File figs/U2192.gif New From Template. Modifying the default.html file is just an easy way to get a head start each time you create a new document, or even a document template.

You can modify the default.html file to act as the basis for creating XHTML-compliant pages as described in Appendix C.

The default.html file does not include locked and editable regions like the templates described in Chapter 8. When a new document is derived from it, all items are editable and unwanted items can be deleted.

    Previous Section Next Section