Click to See Complete Forum and Search --> : How to add a new file type?


Gary King
02-03-2003, 07:26 PM
How can I add a new file type to Dreamweaver MX?

For example, if I want to add a file type with the extension *.test to Dreamweaver MX, and also I want Dreamweaver to color code the file, then how would I go about doing that?

Thanks in advance!

Eccen
02-14-2003, 01:07 AM
First go to Macromedia Dreamweaver Folder...

Then... 'Configuration' > 'DocumentTypes'

Usually as follow: C:\Program Files\Macromedia\Dreamweaver MX\Configuration\DocumentTypes

There should be a file named 'MMDocumentTypes.xml'

Open the xml file and modify it, and... enjoy DW :)

Gary King
02-14-2003, 05:55 PM
Thanks very much for the reply! :)

But, could you (or someone) please explain how I can add a new file type there? And how to have the code in the file type files to be colour-coded, like when modifying a .php or .html file?

Thanks! :)

CJ@G3
03-05-2003, 11:21 AM
look in the DW preferences. there is a section on file types; rather than editing the configuration file manually. all adding a file type will do, is specify to your system that dreamweaver is to open that type of file. the file will most likely be treated as 'code', and code language will be detected by DW automatically and coloured similarly.

Hope this explains


CJ

Gary King
03-05-2003, 11:26 AM
Nevermind, I have already found the solution to my question at Dreamweaver's website.

er0k
03-08-2003, 04:41 PM
god... you mean to tell me people actually use dreamweaver still? what happened to pure code.. :(

Gary King
03-08-2003, 09:14 PM
Who said I always used Dreamweaver? ;)

PabloAgogo
03-26-2003, 12:54 PM
Originally posted by Blak n Wite
Nevermind, I have already found the solution to my question at Dreamweaver's website.

Seeing that the kind folk on this forum took time out to help you with your question, wouldn't it be nice to share the solution with the rest of us?
:confused:

Gary King
03-26-2003, 06:11 PM
Originally posted by PabloAgogo
Seeing that the kind folk on this forum took time out to help you with your question, wouldn't it be nice to share the solution with the rest of us?
:confused:

I used Eccen's solution.

digitizelife
06-06-2006, 03:21 PM
I Googled this question and found this post. I was able to get the code highlighting for PHP and HTML and other code as well. I resolved it by doing a few things;

1. Open the XML document named "MMDocumentTypes.xml" located in "C:\Program Files\Macromedia\Dreamweaver MX\Configuration\DocumentTypes"

2. Find the following code;

<documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic" winfileextension="php,php3" macfileextension="php,php3" file="Default.php">
<TITLE>
<MMString:loadString id="mmdocumenttypes_14" />
</TITLE>
<description>
<MMString:loadString id="mmdocumenttypes_15" />
</description>
</documenttype>

3. Copy the above code and copy [Ctrl + C]

4. Go o the end of the document [Ctrl + End] and Paste [Ctrl + V]

5. Change the following code;

winfileextension="php,php3" macfileextension="php,php3"

to

winfileextension="tpl" macfileextension="tpl"

6. Change the following code;

<MMString:loadString id="mmdocumenttypes_14" />

and

<MMString:loadString id="mmdocumenttypes_15" />

to

<MMString:loadString id="mmdocumenttypes_64" />

and

<MMString:loadString id="mmdocumenttypes_65" />

Note: The above two numbers (64 & 65) should be the next two largest numbers in the XML document.

7. Save and close the file.

8. Go to "Edit / Preferences" in Dreamweaver, click "File Types/Editors" and add the extension .tpl to the Extensions list and add Dreamweaver as the Editor