Dreamweaver 8 Code Coloring

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):

  1. Close Dreamweaver.
  2. Go to $DW_INSTALL\Configuration\DocumentTypes\ where $DW_INSTALL is the installation directory of Dreamweaver.
  3. Edit the file MMDocumentTypes.xml
  4. Search for
    
    

    and add “inc” to the list “php,php3,php4,php5”.

  5. Save the file and restart Dreamweaver. The code coloring will now work for .inc files!

Errors

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…)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s