{content} content is printed for every content block

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Marloes
New Member
New Member
Posts: 3
Joined: Sat Nov 05, 2011 6:17 pm

{content} content is printed for every content block

Post by Marloes »

I'm using cmsms version 1.10 "Martinique"

In my templates I've got several additional content blocks. They work fine exept in one template. In this template the text I put in the {content} wysiwyg area is printed for every additional content block. So when the content is "test test" the output is like:

test test

test test

test test

when there are 2 additional content blocks.

I do not see any difference to the templates that are working fine.
The smarty code in this template is:

Code: Select all

{content}

 {content block="anotherblock1" assign="block1" oneline="true" label='first extra block'}
 {content block="anotherblock2" assign="block2" label='second extra block'}

{$block1}
{$block2}
Same behaviour when I put it in the template without assign, like this:

Code: Select all

{content}

 {content block="anotherblock1" oneline="true" label='first extra block'}
 {content block="anotherblock2" label='second extra block'}

In my other templates there is no problem at all, and it almost seems to me that this problem accured after I tried to use the default attribute on the additional content blocks. So I've removed those but it doesn't make a difference.
The only big difference between the not-working and working template is that the not-working template is a protected content page.

Does anyone know what's going on here?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: {content} content is printed for every content block

Post by RonnyK »

Do I understand correctly that you insert logic in one block, and that it gets repeated in all 3?

If so, could you paste (or PM) the template that you have, and a screenshot of the edit-page.

Also you might upgrade to 1.10.1, as some add-content-block is changed there as well....

Ronny
Marloes
New Member
New Member
Posts: 3
Joined: Sat Nov 05, 2011 6:17 pm

Re: {content} content is printed for every content block

Post by Marloes »

All right, tried the upgrade, but didn't fix the problem unfortunately...
So here the full template code, and screenshots

Hope you'll find something weird or a typo or something, I don't see it...

Code: Select all

{process_pagedata}
<!DOCTYPE html>
<__html>
<head>
<title>{sitename} - {title}</title>
{metadata}
{cms_stylesheet}
</head>
</__body class="cScheme-groen">

{if !$ccuser->loggedin()}
  {redirect_page page='inloggen-voor-ouders'}
{/if}

<div id="pWrap">
<div id="cWrap">
  <div id="intro" class="block blockSolid">
    <h1>Opvangboekje</h1>
    {if $ccuser->loggedin()}
      {cms_module module=FrontEndUsers}
    {/if}
    {global_content name='block corners'}
  </div>

{if $ccuser->loggedin()}

  <div class="diaryNav">
    {menu childrenof="inloggen-voor-ouders"}
  </div>

      <div class="block">
        <h2>{title}</h2>
{content}

 {content block="anotherblock1" assign="block1" oneline="true" label='first extra block'}
 {content block="anotherblock2" assign="block2" label='second extra block'}

{$block1}
{$block2}

        {global_content name='block corners'}
      </div>

  {content block='Afbeeldingen' assign="blockPhoto" label='Plaats hier afbeeldingen in'}
  {if !empty($blockPhoto)}
    <div class="photosBlock">
      <h2>Foto's</h2>
      {$blockPhoto}
      {global_content name='block corners'}
    </div>
  {/if}

      <div class="block">
        <h2>Reacties</h2>
        {CGFeedback action='summary'}
        {CGFeedback titlerequired="0" emailrequired="0"}
        {global_content name='block corners'}
      </div>

{else}
    <div class="block">
      {cms_module module=FrontEndUsers}
    </div>
  {/if}

</div>

{global_content name='page end'}
Attachments
Output on frontend, as you see only repeating content of the first content area, and the saved content of the other blocks is not printed at all
Output on frontend, as you see only repeating content of the first content area, and the saved content of the other blocks is not printed at all
screenshot of edit area's in content page
screenshot of edit area's in content page
Marloes
New Member
New Member
Posts: 3
Joined: Sat Nov 05, 2011 6:17 pm

Re: {content} content is printed for every content block

Post by Marloes »

Nobody any idea?
Post Reply

Return to “The Lounge”