Add Dreamweaver Extensions

To colour-code a new extension ( .ctp CakePHP templates for example ), edit the file C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\Extensions.txt and add the .ctp extension to the first line ( All Documents ) and the PHP Files section :

PHP,PHP3,PHP4,PHP5,TPL,CTP:PHP Files

Next, edit C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\DocumentTypes\MMDocumentTypeDeclarations.xml and add the .ctp extension to the appropriate section – in this case :
winfileextension="php,php3,php4,php5,ctp" macfileextension="php,php3,php4,php5,ctp"

Restart dreamweaver and you should be good to go. The paths will be a little different in CS2 and below, probably under C:\Program Files\Macromedia\Dreamweaver



2 Responses to “Add Dreamweaver Extensions”  

  1. 1 Chris N

    Isn’t the second file name actually MMDocumentTypes.xml and not MMDocumentTypeDeclarations.xml?

    Thats where I found my document types. Thanks for the great info though. I always forget how to make these changes and it was nice to have simple instructions.

  2. 2 mantosz

    thank you! your article is so helpful.

Leave a Reply