Click to See Complete Forum and Search --> : Making the body tag editable


webacity
09-28-2010, 12:12 PM
I use dreamweaver cs4 to create a template

I want to make my body tag editable

I assumed I could just apply another editable region

however it doesn't like it

I assume it's lloking for the closing tag?

Unfortunately the closing tage </body> is at the end.

It appears you can't have overlapping editable reagiosn

The reason why I want the body tag editable is that I want to use AP drag elements.

It needs to add additional code to the body tag that is not part of the templatei.e.

<body onload="MM_dragLayer('apDiv1','',0,0,0,0,true,false,-1,-1,-1,-1,233,156,50,'MM_showHideLayers(\'pop1\',\'\',\'show\',\'pop2\',\'\',\'hide\')',false,'');MM_dragLay er('apDiv4','',0,0,0,0,true,false,-1,-1,-1,-1,54,207,50,'MM_showHideLayers(\'pop1\',\'\',\'hide\',\'pop2\',\'\',\'show\')',false,'')" class="twoColHybRtHdr" id="topofpage">



code excerpt of original template

</head>

<!-- TemplateEndEditable -->

<body class="twoColHybRtHdr" id="topofpage">

<div id="container">
<div id="topheader">
<div id="logo"><img src="../media/icons/logo.jpg" alt="logo" width="70" height="70" /></div>
<!-- TemplateBeginEditable name="moduletitle" -->
<div id="moduletitle"><strong>Module Title</strong></div>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="sessiontitle" -->
<div id="sessiontitle">Session Title</div>
<!-- TemplateEndEditable -->
<!-- end #header -->
</div>

holyhttp
09-29-2010, 08:40 PM
Making the body tag editable?
The body tag contains the entire content of the web page. So making the bod tag editable defeats the purpose of DW templates. The goal is to only make portions of the design editable while keeping common sections non editable. If you meant adding an editable region before the '<div id="container">' then that's another story.

If you have some javascript code to be inserted in the body tag then I suggest you do it in the template file. You could also make all those function calls from a <script>...</script> section placed in the head of your document. It would keep your template cleaner.