|
|
|
Creating a Dreamweaver template
You can create a template from an existing document (such as
an HTML, Macromedia ColdFusion, or Microsoft Active Server Pages
document) or you can create a template from a new, blank document.
The New Document dialog box (File >New) provides several
options for creating new templates, and creating template-based
pages.
Dreamweaver saves templates with the file extension .dwt. Templates
are saved in a special Templates folder in the local root folder
of the site. If the Templates folder does not already exist
in the site, Dreamweaver automatically creates it when you save
a new template.
Note: Do not move your templates out of the
Templates folder, or put any non-template files in the Templates
folder. Also, do not move the Templates folder out of your local
root folder. Doing so causes errors in paths in the templates.
Saving a document as a template
You can create a template from a new document or from an existing
document.
If you insert a template region in a document that hasn’t
been saved as a template, Dreamweaver advises you that the document
will automatically be saved as a template.
To create a template:
- Open the document you want to save as a template in the
Document window, by doing one of the following:
- To open an existing document, choose File > Open
and select the document.
- To open a new blank document, choose File > New.
In the dialog box that opens, choose Basic Pages or Dynamic
pages. In the document list select the type of page you
want to work with, then click Create.
- When the document opens, choose File > Save as Template.
Note: Unless you selected Don’t Show This Dialog Again,
you’ll receive a warning that says the document you’re
saving has no editable regions.
- Click OK to save the document as a template, or click Cancel
to exit this dialog box without creating a template.
- In the dialog box that appears, select a site to save the
template in from the Site pop-up menu, and enter a unique
name for the template in the Save As text box.
- Click Save.
The template file is saved in the site’s Templates folder,
with a .dwt filename extension.
To create a new template using the Assets panel:
- Open the Assets panel (Window > Assets or F11), if it
isn’t already open.
- Select the Templates category.
- Click the New Template button in the Assets panel.
A new document is added to the Name list. The document name
is highlighted.
- Type a name for the document.
- Click the Edit button in the Assets panel.
A template document opens in the Document window.
|