PDA

View Full Version : You placed the editable region "editregion1" inside a block tag


googlefoundme
09-13-2009, 07:29 AM
i am using a template to build my site...

i inserted an editable region on the template so i can change spacific content when i create a new pages from the template...

when i save the template i get the error message "you placed the editable region "editregion1" inside a block tag" ect ect ect...

i was doing just fine with ignoring this message while creating new pages from the template because i was able to insert new text and pictures fine until i tried to start building a form for my sign up page...

i believe that the region has to be moved in the script but i don't know where to put it while still haveing it be positioned in the same place where it is now in the design view...

please help as i have only found the equivalent of Chinese while searching on this subject.

i am a novice but am familiar with most of the dreamweaver terms...

THANKS< THANKS< THANKS!

Corrosive
09-13-2009, 07:36 AM
Code or a URL would be really useful.

googlefoundme
09-13-2009, 07:40 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #333333;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
.twoColLiqLtHdr #container {
width: 750px; /* this will create a container 80% of the browser width */
background: #333333;
margin: 0 auto;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.twoColLiqLtHdr #header {
background: #333333;
background-color: #333333;
}
.twoColLiqLtHdr #header h1 {
}

/* Tips for sidebar1:
1. since we are working in percentages, it's best not to use padding on the sidebar. It will be added to the width for standards compliant browsers creating an unknown actual width.
2. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".twoColLiqLtHdr #sidebar1 p" rule.
3. Since Explorer calculates widths after the parent element is rendered, you may occasionally run into unexplained bugs with percentage-based columns. If you need more predictable results, you may choose to change to pixel sized columns.
*/
.twoColLiqLtHdr #sidebar1 {
float: left;
width: 150px; /* since this element is floated, a width must be given */
background: #333333; /* top and bottom padding create visual space within this div */
height: 280px;
}
.twoColLiqLtHdr #sidebar1 h3, .twoColLiqLtHdr #sidebar1 p {
}

/* Tips for mainContent:
1. the space between the mainContent and sidebar1 is created with the left margin on the mainContent div. No matter how much content the sidebar1 div contains, the column space will remain. You can remove this left margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends.
2. to avoid float drop at a supported minimum 800 x 600 resolution, elements within the mainContent div should be 430px or smaller (this includes images).
3. in the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs.
*/
.twoColLiqLtHdr #mainContent {
background-color: #333333;
width: 590px;
height: 280px;
float: right;
}
.twoColLiqLtHdr #footer {
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background:#333333;
}
.twoColLiqLtHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}

/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
background-color: #333333;
}
.style1 {
color: #0000FF;
font-weight: bold;
}
.style3 {
font-size: x-small
}
-->
</style><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColLiqLtHdr #sidebar1 { padding-top: 30px; }
.twoColLiqLtHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>

<body class="twoColLiqLtHdr" onload="MM_preloadImages('../images/2/page-layout-w-headder1_04.jpg','../images/2/page-layout-w-headder1_08.jpg','../images/2/page-layout-w-headder1_09.jpg','../images/2/page-layout-w-headder1_10.jpg','../images/2/page-layout-w-headder1_11.jpg','../images/2/page-layout-w-headder1_13.jpg','../images/2/page-layout-w-headder1_12.jpg')">

<div id="container">
<div id="header">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="../images/headder.jpg" alt="" width="750" height="164" border="0" usemap="#map1" /></p>
<p>
<map name="map1" id="map1">
<area shape="rect" coords="70,6,194,33" href="../barlistings.html" alt="bar listings a-z" />
<area shape="rect" coords="243,3,315,33" href="../drinks.html" alt="drinks" />
<area shape="rect" coords="352,4,421,34" href="../signup.html" alt="signup" />
<area shape="rect" coords="458,4,526,34" href="../about.html" alt="about" />
<area shape="rect" coords="572,4,657,35" href="../advertise.html" alt="advertise" />
<area shape="rect" coords="39,50,340,137" href="../index.html" alt="hidden.com home page" />
</map></p>
</div>
<div id="sidebar1"><a href="../days/monday.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','../images/2/page-layout-w-headder1_04.jpg',1)"><img src="../images/1/page-layout-w-headder1_04.jpg" name="Image10" width="150" height="43" border="0" id="Image10" /></a><a href="../days/tuesday.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','../images/2/page-layout-w-headder1_08.jpg',1)"><img src="../images/1/page-layout-w-headder1_08.jpg" name="Image4" width="150" height="42" border="0" id="Image4" /></a><a href="../days/wednesday.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','../images/2/page-layout-w-headder1_09.jpg',1)"><img src="../images/1/page-layout-w-headder1_09.jpg" name="Image5" width="150" height="35" border="0" id="Image5" /></a><a href="../days/thursday.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','../images/2/page-layout-w-headder1_10.jpg',1)"><img src="../images/1/page-layout-w-headder1_10.jpg" name="Image6" width="150" height="40" border="0" id="Image6" /></a><a href="../days/friday.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','../images/2/page-layout-w-headder1_11.jpg',1)"><img src="../images/1/page-layout-w-headder1_11.jpg" name="Image7" width="150" height="38" border="0" id="Image7" /></a><a href="../days/saturday.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','../images/2/page-layout-w-headder1_12.jpg',1)"><img src="../images/1/page-layout-w-headder1_12.jpg" name="Image11" width="150" height="38" border="0" id="Image11" /></a><a href="../days/sunday.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','../images/2/page-layout-w-headder1_13.jpg',1)"><img src="../images/1/page-layout-w-headder1_13.jpg" name="Image9" width="150" height="44" border="0" id="Image9" /></a></div>
<p>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
<!-- TemplateBeginEditable name="EditRegion3" -->EditRegion3<!-- TemplateEndEditable --></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="footer">
<p align="center"><a href="www.hidden.com">hidden 2009</a></p>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>

Corrosive
09-13-2009, 07:47 AM
I don't see editregion1 in there. I see the standard 'head' and 'doctitle' and also editregion3....That's odd.

googlefoundme
09-13-2009, 07:49 AM
it is region 3... i was just using region 1 as a general example... sorry for the confusion

Corrosive
09-13-2009, 07:54 AM
If it IS referring to editregion3 then you have indeed placed it inside a block tag. <p>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
<!-- TemplateBeginEditable name="EditRegion3" -->EditRegion3<!-- TemplateEndEditable --></p>

The paragraph tag (p) (highlighted in red) is a block tag.

googlefoundme
09-13-2009, 08:00 AM
i took a look at the code... removing the first <p> resolved the issue and i am now able to create forms in the new pages from the template...

Corrosive thank you... your service is very much appreciated!

Corrosive
09-13-2009, 08:01 AM
i took a look at the code... removing the first <p> resolved the issue and i am now able to create forms in the new pages from the template...

Corrosive thank you... your service is very much appreciated!

No problem but you should remove the closing </p> tag as well. You don't want random closing tags floating around in your code!

Pegasuspg
04-06-2010, 08:30 PM
Yup
Have the same problem with this. I can place photos or text but not elements. In this case I want to be able to place a table for example
Here's the code around the main content container. My patience is wearing a bit thin here so a any help would be appreciated:???: I tried the fix recommended above but got into hot water.

</li>
<li><a href="http://www.theweathernetwork.com/weather/cans0106">The Weather Network</a></li>
<li><a href="http://www.lau.chs-shc.gc.ca/cgi-bin/tide-shc.cgi?queryType=showFrameset&amp;zone=30&amp;language=en glish&amp;region=5&amp;stnnum=247"> Fundy Tide Tables</a></li>
</ul></div>
<div id="sidebar2">
<!-- end #sidebar2 -->
<!-- TemplateBeginEditable name="rtSideBar" --><!-- TemplateEndEditable --></div>
<div class="thrColAbsHdr" id="mainContent">
<h1><!-- TemplateBeginEditable name="text" --><!-- TemplateEndEditable --></h1>
</div>
<div id="footer">
<!-- end #footer --></div>
<!-- end #container --></div>

DWcourse
04-06-2010, 10:09 PM
In this code:
<h1><!-- TemplateBeginEditable name="text" --><!-- TemplateEndEditable --></h1>

You've placed your editable region "text" inside an h1 tag so you can only place items that are permitted inside an h1 tag in that region. Just get rid of the opening and closing h1 tags and you should be good to go.

Pegasuspg
04-06-2010, 11:21 PM
Rock Star!! Thanks a million!

CatastroficCat
09-02-2011, 07:22 PM
Can someone please tell me what a "Block Tag" is? I have highlighted a heading on a template and have an error message saying..... You placed the editable region "HeadingText1" inside a block tag.......... but, I don't know what a "block tag" is and therefore don't understand the message or what it means. Can someone help me please?

I used a standard template and when I went to save it, it said I didn't have any "editable region" so, I watched a good tutorial to tell me how to do this but, when "I" did it, it sent the error message above, but, I did what the video tutor did (well.... obviously I didn't as he didn't get this message and I did!).... what am I doing wrong please?

Thank you.

DWcourse
09-02-2011, 07:28 PM
A block tag refers to any html object that displays as a block (like a div - h1, p, etc.) as opposed to an inline tag that displays inline (iike a span - em, a, etc).

DW will generally warn you (but not stop you) when you place an editable region inside a heading or paragraph tag such as:

<h1><!-- TemplateBeginEditable name="text" --><!-- TemplateEndEditable --></h1>

Including the <h1></h1> from the above inside the editable region gives you more flexibility to add content there.

CatastroficCat
09-02-2011, 09:39 PM
:roll: Thank you, I think!! Well, thank you very much for coming back to me and trying to explain. I will now endeavour to check out all that's written below and hopefully it'll sort my problem out. Thanks http://www.dreamweaverclub.com/forum/images/icons/icon14.gif