Differenet styling in cms double content error ?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
slu
New Member
New Member
Posts: 5
Joined: Wed Jul 25, 2012 5:52 pm

Differenet styling in cms double content error ?

Post by slu »

Hello out there, I am trying to to use different
css formatting depending on $show_sidebarmenu . The code is like this:

<!-- CONTENT 3 spaltig mit sidebar -->
{if $show_sidebarmenu == "+"}
<div id="content">
<div class="col-one">
{if $show_extra == "+"}
<h2>{title}</h2>
{/if}
{content}
</div>
</div>
{else}
<!-- CONTENT 2 spaltig ohne sidebar -->
<div id="content">
<div class="col-one-wide">
{if $show_extra == "+"}
<h2>{title}</h2>
{/if}
{content}
</div>
</div>
{/if}


It works, but now I get a cms Error if I try to
edit Content with TinyMCE.
What may I do ?
Thank you very much for your help.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: Differenet styling in cms double content error ?

Post by Jo Morg »

You shouldn't be calling {content} twice on the template.
You can, however use {content assign=maincontent label="My content block"} just after {process_pagedata} and change each {content} you have on your original template to {$maincontent}
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
slu
New Member
New Member
Posts: 5
Joined: Wed Jul 25, 2012 5:52 pm

Re: Differenet styling in cms double content error ?

Post by slu »

Jo Morg wrote:You shouldn't be calling {content} twice on the template.
You can, however use {content assign=maincontent label="My content block"} just after {process_pagedata} and change each {content} you have on your original template to {$maincontent}

Thank You Jo !
This works fine
Best
slu
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: Differenet styling in cms double content error ?

Post by Jo Morg »

You're welcome.
Please mark as [solved].
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “Layout and Design (CSS & HTML)”