repeated {content} fields

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
pumuklee

repeated {content} fields

Post by pumuklee »

hi

i want to make a template with many {content} fields
but i want that the cms admin user to have the possibility to specify how many
from cms admin panel

because now when i want to insert for example 3 {content} in the template
i must insert directly this in template somtehing like this

{content block="c1"}
{content block="c2"}
{content block="c3"}

i want to ask that if it exist something like this module or not?

thanks
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: repeated {content} fields

Post by Dee »

pumuklee wrote: i want to ask that if it exist something like this module or not?
There's nothing like that I know of. Normally you would make different templates and have the cms admin user specify the template.

Regards,
D
cyberman

Re: repeated {content} fields

Post by cyberman »

You can try to do it with Smarty ... insert something like this in your template (for every block)

Code: Select all

{content block="c1" assign=c1}
{if $c1 neq ""}
{content block="c1"}
{/if}
pumuklee

Re: repeated {content} fields

Post by pumuklee »

Code: Select all

{content block="c1" assign=c1}
{if $c1 neq ""}
{content block="c1"}
{/if}
this solution is for eliminate empty {content} blocks

but i want something like this

contentname = array(name1,name2...)

{foreach item from=contentname}
  {content block="item" assign=item}
{/foreach}

and with the possibility in cms admin area to specify the lenght of the contentname array
or the names of the ontent blocks...

the important is to have the possibility to specify how many {content} element the admin want on the page-dinamically
not to modify the template for this

thanks
Last edited by pumuklee on Thu Jan 11, 2007 10:30 am, edited 1 time in total.
Locked

Return to “Modules/Add-Ons”