Converting a Dreamweaver Template to an Expressions Template
What should be an easy task for Expressions is the recognition of Dreamweaver templates. Unfortunately, Microsoft rarely makes anything simple. Their help is void of any mention of Dreamweaver, or conversion of any other type of template… I mean, how dare you consider using another WYSWYG editor on your website! Well, in my case, Expressions is my preferable editor, while my daughter uses Dreamweaver on her MAC and I often purchase websites with Dreamweaver templates. So converting these templates by hand is something I’m used to doing. The good news is its not that difficult… which is what makes me wonder why MS didn’t give us that option?
Expressions (and Front Page) refer to a template region in their code using the following syntax:
<!– #BeginEditable “doctitle” –> <!– #EndEditable –>
Anything you add for the specific page for the doctitle would go between the two tags, to look something like this:
<!– #BeginEditable “doctitle” –>My Web Page <!– #EndEditable –>
The first code is added by Expressions to the template. The second code with the title inserted in place of “My Web page” is what will be on the actual html page you build.
Similarly, Dreamweaver also uses the same type of coding, just in a different format.
<!– TemplateBeginEditable name=”doctitle” –> <!– TemplateEndEditable –>
So the coding above is what you’ll find within the template (.dwt) file, and the following is similar to what you’ll see on an html page:
<!– TemplateBeginEditable name=”doctitle” –>My Web Page<!– TemplateEndEditable –>
I think you can now see what you need to do to make the Dreamweaver template work for Expressions. You need to make changes in all of the html, php, asp, etc. files AND the .dwt files for the website, by changing the Dreamweaver coding format to the Expressions coding. I use a program called NoteTab Pro when editing text files. The programming ability is quite extensive within the program, as is the ability to replace text within multiple files without having to open them. Before doing any editing on the website files, make sure you back them up first, so that you have something to fall back on if your search and replace goes really bad.
I first do a search and replace for the following code:
<!– TemplateBeginEditable name= ”
I replace it with this code:
<!– #BeginEditable ”
I then do the same with the end tag:
I do a search and replace for:
And replace it with
Once you’ve made the changes in all of the files needed for the website, open the website in Expressions, and then open the template (.dwt file). You should get the following message:
In order for a site to use a template, you must first set the option with the Site Settings area of the Site Menu to manage the site using metadata files. Once you select that, then any change you make to the template will be incorporated into the existing display pages.
Finally, even though Microsoft Expressions now recognizes that you are using templates with your site, you will still need to attach your actual template to the files. Select all of your site files in the file browser, Click “Format” and then “Dynamic Web Template” and choose to “Attach Dynamic Web Template.”
Best of luck!