This is by far the simplest method (in DWMX - may work in earlier version too)...

1. Open 'Dreamweaver Directory / Configuration / DocumentTypes? / MMDocumentTypes?.xml'

2. In the first 'documenttype' tag you just need to add 'tpl' to the list of file extensions (notice window and mac versions).

3. Restart Dreamweaver

DWMX will now treat all your .tpl files the same as .html files meaning you can edit them in code AND design view! You may not get fancy code colouring but it's still workable.

Simon Rycroft

Thanks to (Dave Labs)? for the following instructions:

Here is some documentation about getting DW to recognize other file types, such as .tpl:

It's not too bad. I got it to work in a few minutes, even though I just started playing with DW myself (I'm used to non-WYSIWYG editors).

If you want to get color syntax highlighting it's a bit more involved: you need to edit the CodeColoring.xml and possibly Colors.xml in your Configuration directory (see caveat below):

1. In CodeColoring.xml, find the HTML scheme (near the top):

<scheme name="HTML" id="HTML" doctypes="ASP.NET_VB,ASP.NET_CSharp,A ...

If you've set DW to recognize TPL as an extension, you should add it here to the doctypes attribute.

2. Add a Smarty scheme to CodeColoring.xml. There is one attached below. To add it, just paste the attached file somewhere between the <codeColoring> </codeColoring> tags, after one of the existing <scheme> </scheme> elements.

If you want to set up your own Smarty colors, I believe it's possible to edit them within DW from a preferences menu somewhere. Or, you can dive into Colors.xml.

A caveat: DW installs "personal" copies of some of the config files in \Documents and Settings\<user>\Application Data\Macromedia\Dreamweaver MX\Configuration\...

These settings will _override_ the ones found in DW's Configuration directory, so change these files instead (and take a backup before doing so).

Suggested scheme for adding to the top of CodeColoring.xml, by Tom Sommer:

( Please remember that this requires that the current smartytags are { and } )

<scheme name="Smarty Template" id="Smarty_Template" priority="21">

	<blockStart name="Block Delimiter" id="CodeColor_PHPScriptBlock" doctypes="HTML" scheme="customText"><![CDATA[{]]></blockStart>

	<brackets name="Bracket" id="CodeColor_JavaBracket"><![CDATA[([])]]></brackets>

	<commentStart name="Comment" id="CodeColor_PHPScriptComment"><![CDATA[*]]></commentStart>

	<defaultText name="Text" id="CodeColor_PHPScriptVariables" />
	<defaultTag name="Other Tags" id="CodeColor_PHPScriptVariables" />
	<defaultAttribute />

	<stringStart name="String" id="CodeColor_PHPScriptString"><![CDATA["]]></stringStart>

	<operators name="Operator" id="CodeColor_PHPScriptOperator"><![CDATA[+-*/%<>!?:=~^`.]]></operators>
	<numbers name="Number" id="CodeColor_PHPScriptNumber" />
	<idCharRest name="Identifier" id="CodeColor_PHPScriptIdentifier">_$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</idCharRest>

<keywords name="Reserved Keywords" id="CodeColor_PHPScriptReserved">

<keywords name="Variables" id="CodeColor_PHPScriptVariables">

<keywords name="Functions" id="CodeColor_PHPScriptFunctionsKeywords">

<sampleText doctypes="HTML,TPL"><![CDATA[]]></sampleText>



Go to and you'll find a Dreamweaver extension. Unpack the zip, double click the .mxp file, and you are done in 2 minutes.