Page 1 of 1

Duplicate content blocks, is there a workaround to make this work? [solved]

Posted: Thu Nov 25, 2010 2:46 pm
by laits
Hi all,

Ok, I have a bunch of Case study pages to put into a site, and the client wants to keep adding as they write more.

I have a quick reference down the right hand side of the page that is content already entered elsewhere,

So effectively wanted a content block to appear twice on the same page, meaning less duplicated input for the client - see http://195.8.196.20/~gss/index.php?page ... -aquadrome (still in construction)- You can see that I am using the Heading and sub heading in the hero, also down the right. They just have different styles attached.

I altered my template and it worked, that was until I went to alter the content and got the "duplicate content block" warning

Anyone have any suggestions for this, just trying to make cmsms - cmsmVs for my client!

Many Thanks

Rich

Re: Duplicate content blocks, is there a workaround to make this work?

Posted: Thu Nov 25, 2010 3:21 pm
by RonnyK
You could do something like

{content block='Sidebar' assign='sidebar_content'}

and then just call the

$sidebar_content

where-ever you want it, so also multiple times.

Ronny

Re: Duplicate content blocks, is there a workaround to make this work?

Posted: Thu Nov 25, 2010 9:17 pm
by laits
Ronny,

You're a star, works perfectly abeit not quite how I thought. The {content block='Sidebar' assign='sidebar_content'} doesn't actually display anything does it. but just sets up for the use of {$sidebar_content}.

Just for posterity, where is the correct place to place the {content block='Sidebar' assign='sidebar_content'} statement, or does it really not matter?

My brain is now working overtime at how many possibilities this method opens up - it's a little like PHP with Smarty.

Many thanks

Rich

Re: Duplicate content blocks, is there a workaround to make this work?

Posted: Thu Nov 25, 2010 9:44 pm
by RonnyK
It doesnt matter where you set it, at that place it shows in the add/edit content, and indeed only goes into the variable.

So that makes you able to put the {$variable} to be placed at whatever, and as many times, as you want.

Ronny