logo-dw

by Ove Klykken, domedia

Originally from Norway, Ove has been spellbound by the webs since 1993. He has worked professionaly in the web industry since 2000. You can find him at oveklykken.com.

Inc and phtml files in Dreamweaver

Make sure Dreamweaver is closed before you follow these instructions.
Dreamweaver 4 users follow ‘Step One’ only.

Step One

Go to your configuration files and open extension.txt. The file extension.txt file is located at:

Dreamweaver 4
C:\Program Files\Macromedia\Dreamweaver 4\Configuration\Extensions.txt
Dreamweaver MX
C:\Program Files\Macromedia\Dreamweaver MX\Configuration\Extensions.txt

Use notepad or another text editor and add PHTML and INC in uppercase. Remember to use a comma to seperate each entry.

Step two

Open the MMDocumentTypes.xml file. You'll most liekely find this file in C:\Program Files\Macromedia\Dreamweaver MX\Configuration\DocumentTypes\MMDocumentTypes.XML

Use notepad or an XML editor to open this file, (do not double-clik it, it will most likely open up in Internet Explorer) Locate the line at the start of this file that look like this:

<documenttype id="HTML" internaltype="HTML" winfileextension="htm,html,xhtml,shtml,shtm,stm,lasso" macfileextension="html,htm,shtml,shtm,lasso" file="Default.html" writebyteordermark="false">

Add phtml and inc to winfileextensions and macfileextensions like this:

<documenttype id="HTML" internaltype="HTML" winfileextension="htm,html,phtml,inc,xhtml,shtml,shtm,stm,lasso" macfileextension="html,htm,phtml,inc,shtml,shtm,lasso" file="Default.html" writebyteordermark="false"> Step Three

To make the inc file editable in Design View, we need to remove from an instance in the Dreamweaver preferences. Open Dreamweaver and go to:

Edit -> Preferences -> File Types, now remove inc in from 'Open in Code View'.

Step Four (Only for Windows XP!)

In XP you also have to need to add inc and phtml to your personal settings:

Dreamweaver MX:
C:\Documents and Settings\user\Application Data\Macromedia\Dreamweaver MX\Configuration\extensions.txt

Dreamweaver 4:
C:\Documents and Settings\user\Application Data\Macromedia\Dreamweaver MX\Configuration\extensions.txt

(the folder can sometimes be named by your username)

If you cannot see the Application Data Folder, go to Tools -> Folder Options ->View and make sure that Show Hidden Files and Folders is checked.

Open extensions.txt in your txt editor and add inc and phtml. Remember the comma to seperate entries.

Close Dreamweaver then re-start it. Dreamweaver should now open phtml and inc files!