Wednesday, July 27, 2011

Changing the Default File Extension in Dreamweaver MX 2004


By default, Dreamweaver MX 2004 saves all HTML files with the .htm extension. This may or may not be the behavior a user desires. Fortunately, it is possible to change the default extension to .html for consistency and ease of access.
Critical Notes: Do not attempt this change without reading these directions completely as making errors in this process can compromise the stability of the Dreamweaver application. Also note that this process must be completed outside of Dreamweaver. You will be editing the basic XML files that drive the application and must not have it running while you do so.
  1. Exit Dreamweaver (File -> Exit on a Windows machine or Dreamweaver -> Quit Dreamweaver on a Macintosh machine).
  2. Navigate to the following directory:
    • [Windows]
      C://Program Files//Macromedia//Dreamweaver MX 2004//Configuration//DocumentTypes
    • [Macintosh - the name of your HardDisk may vary]
      HardDisk//Applications//Macromedia Dreamweaver MX 2004//Configuration//DocumentTypes
  3. Once inside the appropriate directory, you need to edit MMDocumentTypes.xml. Do this in Windows by right clicking the filename, selecting Open WithÖ and choosing Notepad. In a Macintosh environment, Control+click the filename, select Open With... and choose TextEdit (you may need to click Other... to locate this application if it does not appear on the list of options).
  4. Within the first few lines of code, you should see the following entry: 
    winfileextension="htm,html,shtml,shtm,stm,tpl,lasso,xhtml"
    Change this entry to:
    winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml"
    Note that you are only switching the order of the first two extensions and nothing more.
  5. Repeat the previous step for the line of code that reads:
    macfileextension="htm,html,shtml,shtm,stm,tpl,lasso,xhtml"
  6. Save the file and exit the text editor.
Start Dreamweaver and verify your changes by selecting Edit -> PreferencesÖ (in Windows) or Dreamweaver -> Preferences... (in Mac) from the menu bar. In the window that appears, select New Document from the Category area and verify that "Default Extension" now reads .html (it will be grayed out).

No comments:

Post a Comment