Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Usability

Dreamweaver MX Code Differences

📄 Contents

  1. The Code Differences
  2. About This Article
  • Print
  • + Share This
Murray R. Summers and Brad Halstead show you the core differences between DW4 and DMX template markup. Dreamweaver MX introduces a whole new series of template markup tags that only the DMX template engine recognizes. DW4 template markup consists of non-editable and editable regions, whereas DMX introduces new editable and non-editable region types and an improved template engine.
From the author of

The Code Differences

As with most new versions of web development applications, the code that the application generates and/or recognizes will differ slightly. Dreamweaver MX is no different in this regard. DMX introduces a whole new series of template markup tags (proprietary-coded comment tags) that only the DMX template engine recognizes. In this article, we will enlighten you as to what the differences are between DW4 and DMX template markup.

As you might already know, DW4 template markup consists solely of non-editable and editable regions, whereas DMX brings to the plate new editable and non-editable region types and a much more robust yet strict, improved template engine. The new regions include

  • Optional Regions
  • MultipleIf Conditional Regions
  • Repeating Regions
  • Repeating Tables
  • Editable Tag Attributes

Along with these, you now have benefits of Parameters, Expressions, Nested Template capabilities, and the ability to lock server code that is positioned above and/or below the HTML.

Although this article doesn't deal with any of the new region types, it certainly does show you the differences between the "core" template markup.

The base DW4 template (see Listing 1.1) consists of template markup that is specific to DW4 but still recognized by DMX.

Listing 1.1 – Base DW4 Template Code

<html>
<head>
<!-- #BeginEditable "doctitle" -->
<title>Untitled Document</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>

Beginning region code: <!-- #BeginEditable "doctitle" -->

Ending region code: <!-- #EndEditable -->

The base DMX template (see Listing 1.2) consists of template markup that is specific to DMX and NOT recognized by DW4 as anything other than a standard HTML comment.

Listing 1.2 – Base DMX Template Code

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

Beginning region code: <!-- TemplateBeginEditable name="doctitle" -->

Ending region code: <!-- TemplateEndEditable -->

"What's the difference between these two documents?"

First, let's look at the region ending code:

 DW4 uses: <!-- #EndEditable --> 
 DMX uses: <!-- TemplateEndEditable -->

The only difference is the content of the proprietary comment. Very basically, the # has been replaced by the word Template.

The differences between the region opening code are more robust:

 DW4 uses: <!-- #BeginEditable "doctitle" --> 
 DMX uses: <!-- TemplateBeginEditable name="doctitle" -->

Similarly to the ending code, the # has been replaced by Template; DMX also gives the region a defined and labeled name attribute and value (name="regionname") whereas DW4 only uses the defined name attribute value ("regionname").

NOTE

Did you notice that DMX also inserts a second default editable region named "head"? This is where child page-specific meta tags, JavaScript, and CSS are placed. This region had to be added manually in DW4.

<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->

WARNING

Once you modify a DW4 template by adding ANY NEW DMX region type, the template will no longer function properly in DW4. You can, however, freely insert DMX standard Editable Regions and the template will continue to function as expected in DW4. With this in mind, ensure that you and your co-workers are absolutely finished with this site in DW4 prior to performing the template conversion!

Those are the base differences between DW4 and DMX template proprietary template markup.

Want more? Check out our support site (http://www.dreamweavermx-templates.com) for more complimentary articles concerning templates.

  • + Share This
  • 🔖 Save To Your Account