Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Customize Dreamweaver to Your Needs

Cartoonists pick and choose their pens. Contractors select their wood. Teachers decorate their classrooms. Why can’t developers customize their editors? Wait a minute… they can!

This article explains a few of the most useful customization tricks which can be achieved by you, the Macromedia Dreamweaver user.

Important Notes

This tutorial is written for Macromedia Dreamweaver MX, the latest version as of December 2002. Many of the examples provided, however, can be achieved in earlier versions (especially v4, a nearly identical Dreamweaver product).

Dreamweaver tweaks may include modifications of the /Configuration/ directory. The files in this folder are essential to the software’s stability. Therefore, a backup is suggested.

When editing a Dreamweaver config file, do not open the document in Dreamweaver. This may compromise stability. Other choices may include Microsoft Notepad or Macromedia HomeSite. I’ll assume you have a basic knowledge of this product and its capabilities.

Controlling Your Document Extensions

One of the very first things I noticed after purchasing Macromedia’s Dreamweaver MX was the default naming of HTML files as .htm documents. Though this is just as acceptable as the traditional .html extension, the transition from my own standards, quite frankly, bugged me. To manage your document extensions, let’s pull up DW’s extension config file at:

../Macromedia/Dreamweaver MX/Configuration/DocumentTypes/MMDocumentTypes.xml

Here you’ll find the document extension settings for our program. To change the default HTML extension, locate line 3 and change the following code from:

winfileextension=”htm,html,shtml,shtm,stm,lasso,xhtml,inc”

to:

winfileextension=”html,htm,shtml,shtm,stm,lasso,xhtml,inc”

In addition, Mac users may make the same alteration to the macfileextension attribute. All we’ve really done here is change the priority of the HyperText Markup Language’s extension. It’s quite simple, really. And by editing things such as this in the file, we can generate entirely new actions for Dreamweaver.

Here’s another that I edited. I found that the browser-readable PHP document type PHPS lacks color coding, so I decided to add this extension to PHP’s extension library. How? On line 67, I changed the winfileextension and macfileextension attributes to include the .phps filetype. They originally read:

winfileextension=”php,php3″

So I changed them to:

winfileextension=”php,php3,phps” 

And, of course, the same changes can be made for macfileextension. With this information you should be able to control your Dreamweaver extension actions effortlessly.

Alter Default Document Templates

Standards change, personal preferences vary, and sometimes we just get plain lazy. Luckily, those kind Macromedia developers have left us a few handy options. Let’s pull up our new document directory at:

../Macromedia/Dreamweaver MX/Configuration/DocumentTypes/NewDocuments/

Here you’ll find all the basic document templates for Dreamweaver-initiated files. All you’ll have to do is open the appropriate filetype document and edit the template to suit your needs. For this example, let’s pretend we want to use the same external cascading stylesheet location for every HTML document we make for the foreseeable future. To make this a part of Dreamweaver’s natural code, we’ll edit the contents of the HTML template, Default.html. It looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
</head>
<body>
</body>
< /html>

Simply edit your code as shown below, and save.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
<link href="/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
< /html>

It’s as simple as that!

Edit the Tag Library

The Dreamweaver tag library is the source for all of your tag settings, including line breaks, contents, and capitalization. This is primarily used to optimize code for filesize and browser compatibility, as things such as white space tend to cause problems. But you might also wish to change a few other options for the sake of convenience. To open the tag library editor, go to:

Edit > Tag Libraries…

A master list of Dreamweaver-written tags and attributes provides concise insight as to what the software is able to produce. New additions will extend both the code-view dropdown menus, and Dreamweaver’s ability to comprehend your documents. Tag formatting should also be taken advantage of. Though Macromedia has created the most respected Internet development software, the default settings are less than stellar.

Comments