So I’m starting this new project for PHP/MySQL (still hidden for all of you, depends on how it turns out) and I wanted to use Drupal-like naming conventions, thus using a bootstrap.inc file containing PHP code. Dreamweaver doesn’t have a WYSIWYG way to add file extensions to existing document types.
How to do it
It’s not that hard if you find the right sources. First, here‘s the page of Maromedia telling you what document types are. So what you have to do is simple (explained for my scenario):
- Close Dreamweaver.
- Go to $DW_INSTALL\Configuration\DocumentTypes\ where $DW_INSTALL is the installation directory of Dreamweaver.
- Edit the file MMDocumentTypes.xml
- Search for
and add “inc” to the list “php,php3,php4,php5”.
- Save the file and restart Dreamweaver. The code coloring will now work for .inc files!
Well, the code coloring sure works now, but still some things are messed up… Like for example: any HTML or PHP file can be viewed in Design mode, but my newly created INC files, still can’t be viewed that way… Before, the INC extension was used for server-side include files, so that was plain text. I’ve removed INC everywhere I could find it, but still, inc remains plain text to edit… I gave up the search for any other form of adjustment, I suppose that INC files for php code are indeed only meant for code, and not for layout, so I should use tpl files instead. (I can hear you all shout: “Of course!” from a distance…)