Edit CakePHP's THML / CTP files with Dreamweaver
Note on July 15th, 2008: I haven’t used dreamweaver for a long time, this article was written back in cake 1.1 days.I suggest Text Mate for Mac OS X, and E Text Editor for Windows.

I needed Dreamweaver to recognize a new file extension called, “thtml” for CakePHP. Here is how I got Dreamweaver to recognize new code extensions and highlight them correctly:
- Edit your Extensions.txt file: C:\Documents and Settings\User\Application Data\Macromedia\Dreamweaver 8\Configuration
- Add in the new file extension into its type: HTM,HTML,HTA,HTC,XHTML, THTML:HTML Documents
- Now Dreamweaver recognizes the new file types but to get code highlighting you need to edit your MMDocumentTypes.xml file: C:\Program Files\Macromedia\Dreamweaver 8\Configuration\DocumentTypes
- Add in the new file extension to HTML winfileextension.
Here is the full article by Adobe: Adobe: Changing and adding file extensions recognized by Dreamweaver
14 comments
Thank you for the information.
I tried it out and it did not work the first time, because I have no write privileges in my “Vista” Program Files, folder. If you follow the steps given above and it also does not work for you, then simply copy the Extensions.txt and the MMDocumentTypes.xml files to your desktop, edit them there, and replace(paste) the files back to their original folder.
If you are using cakePHP you will find files .thtml and .ctp and to open files with extension .thtml and .ctp in Adobe Dreamweaver you need to follow these steps:
Now the final step
Thanks mate, helped me open/edit .ctp files directly!
Thanks freind..!!
Its great help…
Opppsssssssssssssssssssssssssssssssss…………
I restart my dreamveawer & its not working now…?
Why?
Or you can use “RJ TextEd” – To edit like all file types :-)
you could always use notepad++ I love it :D
what about mac – with regards to the final step: Open file Extensions.txt inside folder (C:\Documents and Settings\Admin\Application Data\ your-dreamweaver-folder \Configuration) – can’t find that file :(
what about mac – with regards to the final step: – can’t find that file :(
Thanks u so much
On Windows 7 the second extensions file is in:
C:\Users\[YourUser]\AppData\Roaming\Adobe\Dreamweaver CS4\en_US\Configuration
I did these things in documentTypes file but still i can not able to open .ctp in dreamweaver, What is the problem with this?
Thanks #2 Ravi!
Most of the websites teaching how to open ctp in dw doesnt mention about the other extensions.txt in documents and settings folder.
Thanks #2 Ravi!
Most of the websites teaching how to open ctp in dw doesnt mention about the other extensions.txt in documents and settings folder.