Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 12th, 2005, 12:10 PM
Registered User
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Editable regions in templates

Hello imar
i know this is probably not the correct forum for this question but in a previous topic i told you about a college project i was doing and you said to ask if i needed help so here goes.

I started off my site by adapting a dreamweaver template to suite my need and everything was going swimmingly until i got the message "editable region is placed with in a block tag <p> or something similar" and went on to say how i wouldn't be able to have paragraphs within this editable region unless the region was outside of block tags. Obviously this means i can't use tables to control the layout of the page which leaves me in a pickle.
I have tried moving the region, deleting tags etc but whatever i try either leaves me with the same problem or creates some major formatting issues. I was wondering if you knew of any way around this problem? I think the block tags it's talking about are the <div> tags. My code is below, the problem area is hilighted in red.

Thanks in advance, Craig
(Sorry if this question is inappropriate for this forum!)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Untitled Document</title>
<link rel="stylesheet" href="../stylesheets/emx_nav_left.css" type="text/css">
<script type="text/javascript">
<!--
var time = 3000;
var numofitems = 7;

//menu constructor
function menu(allitems,thisitem,startstate){
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;
  this.numberofmenuitems = 7;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}

function closesubnav(event){
  if ((event.clientY <48)||(event.clientY > 107)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}
// -->
</script>

<style type="text/css">
<!--
body {
    background-image: url(../images/bg_grad.jpg);
}
-->
</style></head>
<body onmousemove="closesubnav(event);">
<div class="skipLinks">skip to: <a href="#content">page content</a> | <a href="../pageNav">links on this page</a> | <a href="#globalNav">site navigation</a> | <a href="#siteInfo">footer (site information)</a> </div>
<div id="masthead">
  <h1 id="siteName">Gateway to the Music Industry in Scotland</h1>
  <div id="utility">
    <a href="../sitemap.asp">Site Map</a> | <a href="../index.asp">Home</a> | <a href="../aboutus/contactus.asp">Contact Us</a>
  </div>
  <div id="globalNav">
    <img alt="" src="../images/gblnav_left.gif" height="32" width="4" id="gnl"> <img alt="" src="../images/glbnav_right.gif" height="32" width="4" id="gnr">
    <div id="globalLink">
      <a href="../courses/courses.asp" id="gl1" class="glink" onmouseover="ehandler(event,menuitem1);">Courses</a>
      <a href="../industry/introduction.asp" id="gl2" class="glink" onmouseover="ehandler(event,menuitem2);">"The Industry"</a>
      <a href="../jobs/jobs.asp" id="gl3" class="glink" onmouseover="ehandler(event,menuitem3);">Jobs</a>
      <a href="../workexp/workexp.asp" id="gl4" class="glink" onmouseover="ehandler(event,menuitem4);">Work Experience</a>
      <a href="..aboutus/aboutus.asp" id="gl5" class="glink" onmouseover="ehandler(event,menuitem5);">About Us</a>
      <a href="../links/links.asp" id="gl6" class="glink" onmouseover="ehandler(event,menuitem6);">links</a>
    </div>

  </div>

  <div id="subglobal1" class="subglobalNav">
    <a href="">Subject</a> | <a href="#">City/Area</a> | <a href="#">Institution</a> | <a href="#">Level</a> | <a href="#">Part Time</a>
  </div>
  <div id="subglobal2" class="subglobalNav">
    <a href="../industry/introduction.asp">Intrduction</a> | <a href="../industry/stats.asp">Statistics</a> | <a href="../industry/keyroles.asp">Key Roles</a> | <a href="../industry/bodies.asp">Industry Bodies</a> | <a href="../industry/reading.asp">Further Reading</a> | <a href="../industry/Jargon.asp">Jargon Buster</a>
  </div>
  <div id="subglobal3" class="subglobalNav">
    <a href="../jobs/jobs.asp">Jobs</a>
  </div>
  <div id="subglobal4" class="subglobalNav">
    <a href="../workexp/workexp.asp">Work Experience</a>
  </div>
  <div id="subglobal5" class="subglobalNav">
    <a href="../aboutus/mission.asp">Mission Statment</a> | <a href="../aboutus/creators.asp">About the Creators</a> | <a href="../aboutus/stow.asp">Stow College</a> | <a href="../aboutus/contactus.asp">Contact Us</a>
  </div>
  <div id="subglobal6" class="subglobalNav">
    <a href="../links/links.asp">Useful Links</a>
  </div>
  <div id="subglobal7" class="subglobalNav">
    <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7
    link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7
    link</a> | <a href="#">subglobal7 link</a>
  </div>
  <div id="subglobal8" class="subglobalNav">
    <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
    link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
    link</a> | <a href="#">subglobal8 link</a>
  </div>
</div>

<div id="pagecell1">

  <img alt="" src="../images/tl_curve_white.gif" height="6" width="6" id="tl"> <img alt="" src="../images/tr_curve_white.gif" height="6" width="6" id="tr">
  <div id="pageName">
    <h2>PageTitle</h2>
    <img alt="small logo" src="" height="59" width="66"/>
  </div>
  <div id="pageNav">
    <div id="sectionLinks">
      <a href="../courses/courses.asp">Courses</a><a href="../industry/introduction.asp">&quot;The Industry&quot; </a><a href="../jobs/jobs.asp">Jobs</a><a href="../workexp/workexp.asp">Work Experience </a><a href="../aboutus/mission.asp">About Us </a><a href="../links/links.asp">Links</a></div>
  </div>
 <div id="content">
    <div class="feature">
      Body Title
    </div>
  </div> <div id="siteInfo">
    <img src="" width="44" height="22"> <a href="../aboutus/mission.asp">About Us</a> | <a href="../sitemap.asp">Site
    Map</a> | <a href="../disclaimer.asp">Privacy Policy</a> | <a href="../aboutus/contactus.asp">Contact Us</a> | &copy;2005
    Craig Robertson
  </div>
</div>

<br>
<script type="text/javascript">
    <!--
      var menuitem1 = new menu(7,1,"hidden");
            var menuitem2 = new menu(7,2,"hidden");
            var menuitem3 = new menu(7,3,"hidden");
            var menuitem4 = new menu(7,4,"hidden");
            var menuitem5 = new menu(7,5,"hidden");
            var menuitem6 = new menu(7,6,"hidden");
            var menuitem7 = new menu(7,7,"hidden");
    // -->
    </script>
</body>
</html>

 
Old April 12th, 2005, 04:07 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Dreamweaver is panicking in this situation, and you can more than safely ignore this message. I do this all the time, in situations like this:

<h1>
Title
</h1>

This allows users of the template to change the title, while they can't change the appearance (h1) of it.

If only there was a "Don't show me this message again" on that dialog box.

Cheers,

Imar
 
Old April 13th, 2005, 04:23 AM
Registered User
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had a hunch it would be something like that. Once again, thanks very much.
Craig






Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested Editable Regions - Dreamweaver LaMP Dreamweaver (all versions) 1 July 14th, 2006 09:29 AM
Regions in the editor bmains VS.NET 2002/2003 1 November 5th, 2003 03:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.