Dreamweaver dose not activate code highlighting/hinting/error-checking unless you are using a file type that it knows, (.php .htm .html .css .js .aspx etc) but I am working on a project written in ASP.NET and I have an issue, Dreamweaver doesn't recognize all the ASP.NET file types. .aspx works, and .vb works but .master files show as plain text, no hinting/highlighting no design view. I can edit as .aspx and then save-as constantly but it is a big hassle. Dose anyone know a way to make Dreamweaver think it is editing a .aspx (for proper hinting) but actually be a .master?
2 回答
For other people who may well be having the same problem following the instructions on this Adobe page, as @rtpHarry rightly points out there is another version of the document that needs updating.
I think this will work for CS5, but the instructions below is for Dreamweaver Creative Cloud.
- Close Dreamweaver, go to
C:\Users[user]\AppData\Roaming\Adobe\Dreamweaver CC\en_US\Configuration\DocumentTypes
Open MMDocumentTypes.xml in Notepad. Note that this Roaming Data is a hidden folder so you may need to change your Windows settings
Change the line for the type of file extension you want to edit. For example, adding a .CSHTML extension to enable regular HTML Code Coloring goes from this:
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">
To this
<documenttype id="HTML" internaltype="HTML" winfileextension="cshtml,html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="cshtml,html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">
- Reopen Dreamweaver and see the changes!
Are you on a Mac? If so, it (probably) shouldn't be more than a little digging in the .APP's PLIST file... something like:
<dict>
<key>com.adobe.dreamweaver</key>
<string>ASPX</string>
<key>public.filename-extension</key>
<array>
<string>aspx</string>
<string>QQZYX</string> <!-- add this line -->
</array>
<key>public.mime-type</key>
<string>text/html</string>
</dict>
I'm on a Windows machine right now, so I can't verify this myself, but you should be able to right-click, open Dreamweaver as a "bundle," open Contents, open the info.plist file with a text editor (Smultron, TextMate) and add another string to the file-extension association array for ASPX files.
In my example, both .aspx files and .qqzyx files will open as ASPX files. You're using Dreamweaver so I assume you're familiar with XML :)
Update: Looks like you want the Extensions.txt file. Instructions here: http://kb2.adobe.com/cps/164/tn_16410.html