Adding File Extensions to Dreamweaver

Dreamweaver features color coding and language awareness for lots of languages, all built in. Files are associated with a language by file extension, but what if you wanted to add an extension? I recently needed to edit an XML file as an XML file, but it did not have an XML extension, and so Dreamweaver treated it as text only (and would not even open it when clicking on in the Files panel). Some users save ColdFusion files with extensions other than CFM or CFML, and Dreamweaver won’t recognize those by default. It took some digging around (and e-mailing the Dreamweaver team) to find out how to add my file extension, and now that I have it working I thought I should share the info in case others want to do the same. So:
1) The list of files that Dreamweaver edits are stored in Configurationextensions.txt (under the Dreamweaver root). This is a plain text file, and you need to add the extension to two places, the “All Documents” line, and the specific file type line (“XML Files” for my file). Doing this allows you to click on a file in the Files panel so as to edit it.
2) You may have a second copy of this file in the user configuration directory (for example, mine is in C:Documents and SettingsbenApplication DataMacromediaDreamweaver MX 2004Configuration), and you’ll need to make the same changes to that file.
3) Next, edit file ConfigurationDocumentTypesMMdocumenttypes.xml (this is the file that associates color coding with file extensions), locate the document type (“XML” in my case), and add the extension to the extension list.
4) And then restart Dreamweaver.
That should do it!

9 responses to “Adding File Extensions to Dreamweaver”

  1. seancorfield Avatar

    Good tip – I nearly always make a pass over these files after a new install to add a few extensions I commonly use!
    Note when editing MMDocumentTypes.xml – the first extension in the list seems to be the default DW uses when saving a new file of a particular type (so if you add a weird extension, you might want to add it at the end of the list). Also note that file has separate extension lists for Windows and Mac.

  2. Ben Forta Avatar
    Ben Forta

    Randy Edmunds on the DW team just pointed me to this tech note which provides more details on this: Thanks.

  3. Massimo Foti Avatar
    Massimo Foti

    Randy was faster than me 🙂
    There is another handy technote that may clarify the way DW’s configuration files work on a multiuser OS. All in all, you shouldn’t touch the main Configuration folder and customize only the one for the relevant user:

  4. Me Avatar

    The real question is why they made this feature so complicated when it was simple in Studio.

  5. David Gilroy Avatar
    David Gilroy

    Hi, I’ve been trying to get DW to colour code my XML and XSLT files for 2 days now and am still getting nowhere. My MMDocumentTypes.xml file has the following :-
    documenttype id="XML" internaltype="XML" winfileextension="xml,xsl,xslt,xsd,rss,rdf,dtd,vtm,vtml,csn,config" macfileextension="xml,xsl,xslt,xsd,rss,rdf,dtd,vtm,vtml,csn,config" file="Default.xml" writebyteordermark="false">
    <MMString:loadString id="mmdocumenttypes_32" />
    <MMString:loadString id="mmdocumenttypes_33" />
    So how come it’s not colouring the code? Where do the colour instructions come from?

  6. ankara evden eve Avatar
    ankara evden eve

    Hi all
    All I want a book that opens with the /apology/ "Actionscript 3.0 is kinda retarded. It’s in transition from being a light scripting language to a robust object-oriented language, and 3.0 is a silly little in-between step that requires you to explicitly declare every variable, but doesn’t require terminating semi-colons on lines."
    <a href=" " title="ankara nakliyat">ankara nakliyat</a> <a href=" " title="ankara nakliyat">ankara nakliyat</a> <a href=" " title="lazer epilasyon">lazer epilasyon</a> <a href="; title="burun esteti?i">burun esteti?i</a> <a href=" " title="saç ekimi">saç ekimi</a> <a href=" " title="lida">lida</a>

  7. saç ekimi Avatar
    saç ekimi

    <MMString:loadString id="mmdocumenttypes_32" />
    <MMString:loadString id="mmdocumenttypes_33" />

  8. tabldot yemek Avatar
    tabldot yemek

    There are no trackbacks for this entry.
    No trackback URL. Trackbacks are only allowed via interactive form.

Leave a Reply