How to configure Dreamweaver CS3 (OS X) to render non-standard file extensions in Design View

If you do a lot of work with template based systems, as I sometimes do, you may find that Dreamweaver refuses to allow you to render some of the files in the Design view. This makes it incredibly difficult to find the correct template by loading it and viewing it.

The Dreamweaver documentation is not terribly clear on how to make the program recognise these files as HTML, or PHP type files. It seems to hint that you can go into your personal Library settings and edit a file called Extensions.txt - this will not work.

So here’s how to do it:

1) Browse to your ‘Applications’ folder

2) Open Adobe Dreamweaver CS3
3) Open Configuration / DocumentTypes

4) Edit the file MMDocumentTypes.xml

5) Find the section you wish to update – in my case it’s the PHP section

6) Edit this line:

documenttype id=”PHP_MySQL” servermodel=”PHP MySQL” internaltype=”Dynamic” winfileextension=”php,php3,php4,php5″ macfileextension=”php,php3,php4,php5,ihtml,pml” file=”Default.php” writebyteordermark=”false”

and add the other extensions that you wish Dreamweaver to interpret as displayable PHP files into the macfileextension section. I think it’s safe to assume that updating winfileextension will do the same for Windows Dreamweaver users.

7) Save the file

8) Restart Dreamweaver and voila!

Leave a Reply