Operation Manual

391
USING DREAMWEAVER
Creating and managing templates
Last updated 3/28/2012
5 In the dialog box that appears, select a folder location, enter a name for the XML file, and then click Save.
An XML file is generated that contains the material from the document’s parameters and editable regions, including
editable regions inside repeating regions or optional regions. The XML file includes the name of the original template,
as well as the name and contents of each
template region.
Note: Content in the non-editable regions is not exported to the XML file.
Import XML content
1 Select File > Import > Import XML into Template.
2 Select the XML file and click Open.
Dreamweaver creates a new document based on the template specified in the XML file. It fills in the contents of each
editable region in that document using the data from the XML file. The resulting document appears in a new
Document window.
If your XML file isn’t set up exactly the way Dreamweaver expects, you might not be able to import your data. One
solution to this problem is to export a dummy XML file from Dreamweaver, so that you’ll have an XML file with
exactly the right structure. Then copy the data from your original XML file into the exported XML file. The result is an
XML file with the correct structure that contains the appropriate data, ready to be imported.
Export a site without template markup
You can export template-based documents in a site to another site without including the template markup.
1 Select Modify > Templates > Export Without Markup.
2 In the Folder box, enter the file path to the folder you want to export the file to or click Browse and select the folder.
Note: You must select a folder outside of the current site.
3 If you want to save an XML version of exported template-based documents, select Keep Template Data Files.
4 If you want to update changes to previously exported files, select Extract Only Changed Files and click OK.
Applying or removing a template from an existing
document
Apply a template to an existing document
When you apply a template to a document which contains existing content, Dreamweaver attempts to match the
existing content to a region in the template. If you are applying a revised version of one of your existing templates, the
names are likely to match.
If you apply a template to a document that hasn’t had a template applied to it, there are no editable regions to compare
and a mismatch occurs. Dreamweaver tracks these mismatches so you can select which region or regions to move the
current page’s content to, or you can delete the mismatched content.
You can apply a template to an existing document using the Assets panel or from the Document window. You can
undo a template application if necessary.
Important: When you apply a template to an existing document, the template replaces the document’s contents with the
template’s boilerplate content. Always back up a page’s contents before applying a template to it.