![]() |
|||
|
|||
Dreamweaver MX Code Differences
As with most new versions of web development applications, the code that the application generates and/or recognizes will differ slightly.
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
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
"What's the difference between these two documents?"
First, let's look at the region ending code:
The only difference is the content of the proprietary comment. Very basically, the <tt>#</tt> has been replaced by the word Template.
The differences between the region opening code are more robust:
Similarly to the ending code, the <tt>#</tt> has been replaced by <tt>Template</tt>; DMX also gives the region a defined and labeled name attribute and value (<tt>name="regionname"</tt>) whereas DW4 only uses the defined name attribute value (<tt>"regionname"</tt>).
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.
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.
About This Article
If you want more in-depth information on this topic, check out Dreamweaver MX Templates,
by Brad Halstead and Murray R. Summers (©2003, New Riders Publishing, ISBN 0-7357-1319-7).
BLOG TALK 
Become a WebProNews blog partner.
Twitter Uncomfortable With 'Tweet' Being Used In Third Party AppsLooks like Twitter is not looking the other way as much these days. TechCrunch reports that there is some concern at the ...
Flickr Just Now Allowing Connectivity With Twitter
Hulu Receives Good News Concerning Their Online Ad Format
Global Gaming Factory Buys Up Pirate Bay


