By default, Dreamweaver cannot read PHTML files. You can add the file type to the
“Open in Code View” section of the preferences if you wish to have fast
access, however you cannot view the file in design view if you do that.
So if you use Dreamweaver (versions 4,
MX, MX2004, 8, or 9, aka CS3,CS4) to design your sites, and you wish to
open Magento’s Template files (they have .phtml
extensions) in Dreamweaver, you can
follow these steps to add support for .phtml
and make Dreamweaver render PHP code (with coloring,
hinting, et al) as well as allow you to see the design in code view if
desired. Below are three steps to follow.*
Step
One: Add .phtml to extension.txt in your
Application Data
pen the following extension configuration file in a notepad and
change the lines as specified below:
XP: Documents and Settings > [user] >
Application Data > Adobe Dreamweaver
> Configuration > extensions.txt
NOTE: 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.
In the first line add PHTML like so:
HTM,HTML,SHTM,SHTML,
... ,TXT,PHP,PHP3,PHP4,PHP5,PHTML,JSP,WML,TPL, ... ,MASTER:All
Documents
In the PHP Files line add PHTML like so:
PHP,PHP3,PHP4,PHP5,TPL,PHTML:PHP Files
Step
Two: Add .phtml to the extension.txt
configuration file
This file is pretty much exactly like the extensions.txt file located
in Dreamweaver’s Application Data
folder, except it is in Dreamweaver’s
Program Files folder, inside a configuration folder. Just as in Step
One, find the file and change the lines as specified below.
XP, Vista: Program Files > Adobe > Dreamweaver [Your Version] > configuration
> Extensions.txt
In the first line add PHTML like so:
HTM,HTML,SHTM,SHTML,
... ,TXT,PHP,PHP3,PHP4,PHP5,PHTML,JSP,WML,TPL, ... ,MASTER:All
Documents
In the PHP Files line add PHTML like so:
PHP,PHP3,PHP4,PHP5,TPL,PHTML:PHP Files
Step Three: Add PHTML to MMDocumentTypes.xml
This will apply your php code coloring settings to your phtml files This file is an XML file which should be
located in:
XP, Vista: Program Files > Adobe > Dreamweaver [Your Version] > configuration
> DocumentTypes > MMDocumentTypes.xml
Add PHTML to this line (approx. line 75)
like so:
<documenttype id="PHP_MySQL" servermodel="PHP MySQL"
internaltype="Dynamic" winfileextension="php,php3,php4,php5,phtml"
macfileextension="php,php3,php4,php5,phtml" file="Default.php"
writebyteordermark="false">;
</documenttype>
Restart or Open Dreamweaver and you
shouldn’t have any problems with PHTML
files any longer.
“Open in Code View” section of the preferences if you wish to have fast
access, however you cannot view the file in design view if you do that.
So if you use Dreamweaver (versions 4,
MX, MX2004, 8, or 9, aka CS3,CS4) to design your sites, and you wish to
open Magento’s Template files (they have .phtml
extensions) in Dreamweaver, you can
follow these steps to add support for .phtml
and make Dreamweaver render PHP code (with coloring,
hinting, et al) as well as allow you to see the design in code view if
desired. Below are three steps to follow.*
Step
One: Add .phtml to extension.txt in your
Application Data
pen the following extension configuration file in a notepad and
change the lines as specified below:
XP: Documents and Settings > [user] >
Application Data > Adobe Dreamweaver
> Configuration > extensions.txt
NOTE: 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.
In the first line add PHTML like so:
HTM,HTML,SHTM,SHTML,
... ,TXT,PHP,PHP3,PHP4,PHP5,PHTML,JSP,WML,TPL, ... ,MASTER:All
Documents
In the PHP Files line add PHTML like so:
PHP,PHP3,PHP4,PHP5,TPL,PHTML:PHP Files
Step
Two: Add .phtml to the extension.txt
configuration file
This file is pretty much exactly like the extensions.txt file located
in Dreamweaver’s Application Data
folder, except it is in Dreamweaver’s
Program Files folder, inside a configuration folder. Just as in Step
One, find the file and change the lines as specified below.
XP, Vista: Program Files > Adobe > Dreamweaver [Your Version] > configuration
> Extensions.txt
In the first line add PHTML like so:
HTM,HTML,SHTM,SHTML,
... ,TXT,PHP,PHP3,PHP4,PHP5,PHTML,JSP,WML,TPL, ... ,MASTER:All
Documents
In the PHP Files line add PHTML like so:
PHP,PHP3,PHP4,PHP5,TPL,PHTML:PHP Files
Step Three: Add PHTML to MMDocumentTypes.xml
This will apply your php code coloring settings to your phtml files This file is an XML file which should be
located in:
XP, Vista: Program Files > Adobe > Dreamweaver [Your Version] > configuration
> DocumentTypes > MMDocumentTypes.xml
Add PHTML to this line (approx. line 75)
like so:
<documenttype id="PHP_MySQL" servermodel="PHP MySQL"
internaltype="Dynamic" winfileextension="php,php3,php4,php5,phtml"
macfileextension="php,php3,php4,php5,phtml" file="Default.php"
writebyteordermark="false">;
</documenttype>
Restart or Open Dreamweaver and you
shouldn’t have any problems with PHTML
files any longer.
No comments:
Post a Comment