Page 1 of 1

[SOLVED] No default content block was detected in this templ

Posted: Fri May 27, 2011 10:18 am
by nervino
Hi All,
I have a problem using a two columns template copied from Cms Version: 1.7.1 "Escada" to Cms Version: 1.9.4.2 "Faanui"

In v. 1.7.1 all works fine, but when I try to save a page in v. 1.9.4.2 which was joined to the two column template, I have this error message:

"No default content block was detected in this template. Please ensure that you have a {content} tag in the page template."

Any ideas?

thank you


My template

Code: Select all

{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{sitename} - {title}</title>
{metadata}
{stylesheet}
<link rel="shortcut icon" href="favicon.ico" >
</head>

</__body id="page_1">
<div class="right_taling"></div>
<div class="site">

<!--==========header=========== -->
<div class="main">
    <div id="header">
{menu template="horizontal}
</div>
</div>
<!--========//header=========== -->
<!-- -->
<!--==========content=========== -->
<div class="content_bg">
  <div class="main">
  	<div id="content">
        <div class="col_1">
            <img src="images/page_1_pic_1.jpg" alt="" width="170" height="150" />&nbsp;        </div>

      <div class="col_2">
            <div class="block_1">
                <div class="right">
                    <div class="title"><img src="images/page_1_title_1.png" alt="" width="280" height="48" /></div>
                    {content block='left col'} 
              </div>
            </div>
        </div>
        <div class="mid">&nbsp;</div>
        <div class="col_3">
            <div class="title"><img src="images/page_1_title_2.gif" alt="" /></div>
          {content block='right col'}

          <div class="top_indent_10px align_right"></div>
        </div>

        <div class="clear"></div>  
    </div>
 </div>
</div>
<!--========//content=========== -->
<!-- -->
<!--==========content_2=========== -->
<div class="content_2_bg">
  <div class="main">
  	 <div id="content_2">
     	<div class="container">
        

<div class="col_2">
  <div class="container">
                	<img src="/images/page_2_pic_1.jpg" class="pic_float" alt="" />
                	<strong><a href="http://www.site.com/portfolio.php">Portfolio</a></strong>
                  <p class="font_2">xxxxxx</p>
                </div>
<div class="container top_indent_15px">
                	<img src="/images/page_1_pic_3.jpg" class="pic_float" alt="" />
                	<strong><a href="http://www.site.com/mail_out/xxxxx.php">xxxx</a></strong>

              <p class="font_2">xxxxxxx</p>
                </div>
    <div class="container top_indent_15px">
                  <img src="/images/page_2_pic_2.jpg" class="pic_float" alt="" /> <strong><a href="#">Link</a></strong>
                  <p class="font_2">xxxxxx</p>
                </div>
            </div>

            <img src="images/banner_1.jpg" class="banner" alt="" />
        </div>
     </div>
  </div>
</div>
<!--========//content_2=========== -->
<!-- -->
<!--==========footer=========== -->
<div class="main">
	<div id="footer">
    	<span><a href="index.php">xxxxx</a> | <a href="xxxxx.php">xxxxx</a> | <a href="xxxxx.php">xxxxx</a> | <a href="xxxxx.php">xxxxx</a></span>

    	<b></b> &copy; 2008 |
 | <a href="privacy.php">Privacy Policy</a>    </div>
</div>
<!--========//footer=========== -->
</div>
<__body>
</__html>

Re: No default content block was detected in this template

Posted: Fri May 27, 2011 10:28 am
by M@rtijn
Well, the error is pretty clear isn't it? ;)
"No default content block was detected in this template. Please ensure that you have a {content} tag in the page template."
You do not have a {content} tag in your template.
This may have been accepted by v1.7.1, but now it is asking you to include the tag.
(strange, because for as far as I know it has always been obliged to have this in your page template)

Read more about setting up page templates: http://wiki.cmsmadesimple.org/index.php ... r_Template

Re: No default content block was detected in this template

Posted: Sat May 28, 2011 6:06 am
by RonnyK
Correct, the block was required longer, but the check was introduced in later versions. As many modules depend on the existance of {content} it now checks it.

With {content label="some label"} give it a nice label if you want, but a default one is required, before other optional {content block="some block" } is usable.

Ronny

Re: No default content block was detected in this template

Posted: Sat May 28, 2011 5:12 pm
by nervino
Thank you both!
Using "label" parameter first, in tag {content}, and then using "block", it works!