Access keys | Skip to primary navigation | Skip to secondary navigation | Skip to content | Skip to footer |
Problems viewing this site

Implementation advice

WYSIWYG

Dreamweaver4 templates

Using the template in Dreamweaver 4 WYSIWYG mode can be problematic. For example, adding a list within the content div causes havoc. Dreamweaver is inserting an extra <div id="content"> within the list item and thus disrupts the page layout.

You can of course go into the code and remove these unwanted tags. This may not be an ideal solution. Fortunately, if you create a Dreamweaver template with the content div as an editable region, lists are created correctly. This workaround however poses its own challenge.

In order to specify how the secondary navigation displays on a particular page it is necessary to edit the onload event handler within the body tag. This is not easily done within a DW 4 template. (MX allows you to define editable tag attributes within templates.)

A possible workaround is to remove the xcSet function call from the body tag. Call the function from between script tags. Ensure the script block is positioned below the secondary navigation html so that it is loaded before we attempt to manipulate it.

There is perhaps a slim possibility that xc.js may not have loaded by the time the call is made. A more cautious approach would be to call a 'menuLoader' function when we are sure everything has loaded. <body onload="menuLoader()"> menuLoader would look something like this:

<script type="text/javascript" language="javascript">
function menuLoader()
{
xcSet('nav2xc', 'xc');
}
</script>

The point of both of these approaches is the script block can be made an editable region of the DW template. Page specific arguments can then be easily added to the xcSet function call.

Last updated December