**Now take a deep breath, I know you’ve been waiting for this answer. I know I have.**
- Go to **[Your_Drive_Here]:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\**
- Open the file **Extensions.txt** and add your custom extensions to the list. Remeber, in **Extensions.txt**, it’s got to be all CAPS. For **CakePhp**, add **THML** to the first line (the one ends with :All Documents) and the **16th** line of the PHP group. Here is the code for the Extensions.txt fileHTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,AS,ASC,ASR,XML,XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX,CONFIG,CS,CSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,TPL,LASSO,JSP,JSF,VB,VBS,VTM,VTML,INC,JAVA,EDML,WML,THTML,INC:All DocumentsAs this first step is just for Dreamweaver to recognize the new file extensions, we have to further edit another config file.
HTM,HTML,HTA,HTC,XHTML:HTML Documents
SHTM,SHTML,STM,SSI,INC:Server-Side Includes
JS:JavaScript Documents
XML,DTD,XSD,XSL,XSLT,RSS,RDF:XML Files
LBI:Library Files
DWT:Template Files
CSS:Style Sheets
ASP,ASA:Active Server Pages
ASPX,ASCX,ASMX,CS,VB,CONFIG:Active Server Plus Pages
CFM,CFML,CFC:ColdFusion Templates
AS:ActionScript Files
ASC:ActionScript Communication Files
ASR:ActionScript Remote Files
TXT:Text Files
PHP,PHP3,PHP4,PHP5,TPL,INC,THTML:PHP Files
LASSO:Lasso Files
JSP,JST:Java Server Pages
JSF:Fireworks Script
TLD:Tag Library Descriptor Files
JAVA:Java Files
WML:WML Files
EDML:EDML Files
VBS:VBScript Files
VTM,VTML:VTML Files
- Go to the **DocumentTypes** folder (still in the same path), edit the file **MMDocumentTypes.xml**\\ (fullpath: [Your_Drive_Here]:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\**DocumentTypes\MMDocumentTypes.xml**) with a Text Editor (i.e. Notepad or Notepad++). It’s not advisible to edit this particular xml file with Dreamweaver as the software may go crazy as it’s being used to edit itself.
- Go to l**ine 67**, add the THTML extesion to the **winfileextension** and **macfileextensionlist** attributes. Here is the code exerpt
- Restart DreamWeaver, then open the .thml of CakePHP. Voila! It’s working! Yay! No more blind-coding.
=== Final Remarks ===
I hope you enjoy the tip. To consult the original documentations, please visit [[http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16410|Dreamweaver Technote: Changing and adding file extensions recognized by Dreamweaver MX]].
Anyway, now with the THTML file is through, good luck with CakePHP. Please design the next killer websites to take back the glory for PHP from the RoR crowd.