February 27, 2020

cm-mini

Thinking Magento

Magento - Editing phtml Files in Dreamweaver

Its only recently that we came across a post which has now brought me a lot of joy to our lives and made it a lot easier on the eyes. Natively dreamweaver does not recognise phtml files and so you end up living in a black and white world, which is ok except you feel like you've been living in a 1950's sid com for the last few years. However help is finally at hand and now you can finally see phtml files for what they really are and we're going to show you how to achieve the same.

First of all since we're all on PC's, the fix described is only for windows based computers. But if you do need a fix for windows you can find the fix here.

  • Step One

Documents and Settings > [user] > Application Data > Adobe Dreamweaver > Configuration > extensions.txt

Change the top line and add the PHTML

HTM,HTML,SHTM,SHTML, ... ,TXT,PHP,PHP3,PHP4,PHP5,PHTML,JSP,WML,TPL, ... ,MASTER:All Documents

And then change the third line down to look like

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

  • Step Two

Program Files > Adobe > Dreamweaver [Your Version] > configuration > Extensions.txt

Change the top line and add the PHTML

HTM,HTML,SHTM,SHTML, ... ,TXT,PHP,PHP3,PHP4,PHP5,PHTML,JSP,WML,TPL, ... ,MASTER:All Documents

And then change the third line down to look like

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

  • Step Three

Program Files > Adobe > Dreamweaver [Your Version] > configuration > DocumentTypes > MMDocumentTypes.xml

Go to line 75 and change it so it looks like below

<documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic" winfileextension="php,php3,php4,php5,<strong>phtml</strong>"<br />macfileextension="php,php3,php4,php5,<strong>phtml</strong>" file="Default.php" writebyteordermark="false">; </documenttype><br /><br />Fin.<br /><br />Now you can live in the real world and see all your code in colour.</pre>"