Skip to main content
Participant
December 18, 2009
Answered

Magento templates & Design View

  • December 18, 2009
  • 2 replies
  • 4584 views

Anyone know how to setup Dreamweaver CS4 to view Magento templates in design view?

I have enabled Dreamweaver to open .phtml files but still get yellow PHP block  (an example of the code for one of these is <?php echo $this->getChildHtml('global_notices') ?>)

This topic has been closed for replies.
Correct answer Ken_Binney-GnPIX3

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.

http://www.magentocommerce.com/wiki/general/opening_phtml_files_in_dreamweaver

2 replies

Ken_Binney-GnPIX3Correct answer
Participant
December 18, 2009

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.

http://www.magentocommerce.com/wiki/general/opening_phtml_files_in_dreamweaver

David_Powers
Inspiring
December 18, 2009

Thread moved to the Dreamweaver Application Development forum, which deals with PHP and other server-side languages.

I haven't used Magento, but I assume that it works in a similar way to WordPress, Drupal, Joomla, etc. The current version of Dreamweaver does not support this type of complex PHP application in Design view. You need to test the pages in a browser. Alternatively, view the page in a browser, save a static HTML version of the page, and work on that in Dreamweaver. Not ideal, but it's the only way at the moment.

SpaiceAuthor
Participant
December 23, 2009

Thanks for such a quick answer David.

I had just come to the same conclusion abpout the static pages and, having read your message, realised that this actually helps me learn more about coding and css so its not so bad after all!