dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Making the body tag editable

  1. #1
    Join Date
    Jun 2010
    Posts
    62

    Making the body tag editable

    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>

  2. #2
    Join Date
    Nov 2006
    Location
    Oakland
    Posts
    500
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles