Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Add new file type (.phtml, Inc) in Dreamweaver for XP, Win7, Vista & Mac


In Dreamweaver by default it cannot display PHTML and INC files correctly. You will notice that if you open a PHTML file it will be in black and white. So this will be complicated for developer to edit the code. So if you use Dreamweaver and you would like to be able to view Magento’s PHTML files then you can follow some simple steps to allow Dreamweaver to display the files correctly for easier editing.

Using following steps you can add new file type in Dreamweaver for XP, Win7-8, Vista & Mac 

Step1: Add .phtml extension to ‘Extension.txt’ in your Application Data

For XP: Documents and Settings -> User – > Application Data -> Adobe -> Dreamweaver[Your Version] – > Configuration -> Extensions.txt

For Windows7: Documents and Settings -> User – > AppData -> Roaming -> Adobe -> Dreamweaver[Your Version] – > Configuration -> Extensions.txt

For Vista: Users -> [user] -> AppData > Roaming -> Adobe -> Dreamweaver[Your Version] -> Configuration -> Extensions.txt

For Mac OS: Users -> [Home Folder] -> Library -> Application Support -> Adobe -> Dreamweaver[Your Version] -> [en_US or other locale (only for version CS4)] – > Configuration -> Extensions.txt

Then open Extensions.txt and add ‘PHTML’ in the first line and in the PHP line. Which should like-

HTM,HTML,SHTM,SHTML,XML,XSL,XSD,…. PHP,PHP3,PHP4,PHP5,PHTML,…. JSP,WML,VTML,INC,JAVA,EDML,WML:All Documents

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

Step2: Add .phtml to the Extension.txt configuration file

This step is same as step one but the Extensions.txt file is located in Dreamweaver’s program files folder and inside a configuration folder. To find out that file go:

For XP & Vista: Program Files – > Adobe -> Dreamweaver[Your Version] -> Configuration > Extensions.txt

For Windows7: Program files -> Adobe ->Dreamweaver[Your Version] -> Configuration -> Extensions.txt

Mac OS: Applications -> Adobe -> Dreamweaver[Your Version] -> Configuration -> Extensions.txt

Step3: Add PHTML to MMDocumentTypes.xml

Now we need to change a XML file to fix the colour coding settings for the .phtml files so the code will be easier to edit. This XML file should be located in:

For XP & Vista: Program Files -> Adobe ->Dreamweaver[Your Version] -> Configuration -> DocumentTypes -> MMDocumentTypes.xml

For Windows7: Program files -> Adobe ->Dreamweaver[Your Version] -> Configuration -> DocumentTypes -> MMDocumentTypes.xml

Mac OS: Applications > Adobe Dreamweaver [Your Version] > configuration > DocumentTypes > MMDocumentTypes.XML

Now open the MMDocumentTypes.XML and add ‘phtml’ to the end of the following lines in the xml files. Which should like-

winfileextension=”php,php3,php4,php5,phtml

macfileextension=”php,php3,php4,php5,phtml

Note: after this all changes you need to restart your Dreamweaver.

 

Copyright @ 2017 HKBlog.