20.1 Customizing the Default DocumentNew, 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 Open, not File 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 templateEdit 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 templateAlthough 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 Save, not File Save As Template. Figure 20-3. Document based on extensively modified templateRemember that you can save any file as a template using File Save As Template and then base a new document on the template using File 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.
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. |