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:
<!– TemplateEnd

And replace it with
<!– #End

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:

Dynamic Web Changes


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!

Dynamic Web Template Won’t Update!

I love Microsoft Expressions, but every once in a while, I want to beat my computer to a pulp. Why I want to blame the computer for something a program isn’t doing correctly is beyond me, but the irrational side can often take over during frustrating moments! Today’s dilemma comes from the inability to update all pages in a sub-web folder from a dynamic web template (DWT). In actuality, the situation I found myself in was a little different then that… so let me explain using this note to self you exactly what happened, and how if you find yourself in my shoes you can work around the issue.

The initial website was created using FrontPage 2003. When a hard-drive failure occurred on my old computer, I uploaded the full website from the online version. Having upgraded on the new computer to Microsoft Expressions I converted to a Web Folder the existing folder I had just uploaded the site to. At that time, any change to the dynamic web template was reflected on all attached pages to that template. A problem arose only when I needed to make a sub-folder for the site into a sub-web folder. Each of the folders had its own template already… so this should have been a breeze to do. The folders just weren’t setup to be their own web folder. I converted the sub-folder into a web-folder and attempted to update the template. No changes were made to the existing pages. I tried updating ALL pages with the new template, that also failed to change the pages to the new template. Attempting to detach and then attach the template was disastrous, as Microsoft Expressions deleted all of the markup language used to identify a region within the page. I then tried creating a new page and attaching the template to the page and that worked fine. Making an additional change to the DWT resulted in changes to the 1 page considered attached.

The workaround? I found out I was able to select multiple pages and change the selected pages using:

Select the pages you wish to update from the folder list.

Click on Format, then select Dynamic Web Template and click on “Update Selected Page.” Presto… the selected pages are updated. Interestingly, you can select all of the pages using this method and they’ll update, but the option to update all pages failed to work.