Dreamweaver's .php code colouring applied to .module files... there is a useful nugget!

Events happening in the community are now at Drupal community events on www.drupal.org.
Fixdit's picture

I have been frustrated when editing .module and other non .php suffixed files that Dreamweaver doesn't colour code?! So here is how to make Dreamweaver do so.

  1. In Dreamweaver's application directroy follow to here: Configuration\DocumentTypes\MMDocumentTypes.xml
  2. In here (MMDocumentTypes.xml file) you should find the lines of code which list the currently accepted suffix formats for php colours to be applied to.
    Something like this: winfileextension="php,php3,php4" or "macfileextension="php,php3,php4"

    Insert "module" onto the end of these like so: winfileextension="php,php3,php4,module" or macfileextension="php,php3,php4,module"

  3. Restart Dreamweaver and it should nicely colour code .module files as php ones.

Note:

this works for Dreamweaver MX and CS3.

Comments

Fabulous!

drupalqueen's picture

Thank you!

How about searching in code?

josvl's picture

Thanks, this works well, also in CS4.
However, Dreamweaver doesn't seem to include files with these extensions when searching text in the code of the current site.
So if you search for, say, a function in any of the .module files of your site, Dreamweaver will not find it. It will look in .php and .inc files but skip the others.
Any ideas on this?

this link has many tips for

rocket777's picture

this link has many tips for dreamweaver and drupal
http://drupal.org/node/18151

Nice

vicktech's picture

I also was wondering why cant i do that from settings dialog.
Nice advice!

FYI this still works in

HL_Dev's picture

FYI this still works in Dreamweaver CS6. Thanks a ton for finding this!

The Herts Lab

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: