CGContentUtils Multiselect Box problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Simon66
Power Poster
Power Poster
Posts: 250
Joined: Wed Aug 29, 2007 4:36 am
Location: Sydney Australia

CGContentUtils Multiselect Box problem

Post by Simon66 »

I have created a Multiselect Box block in CGContentUtils.

It works perfectly with an option list in the options field:
Test 1|test_1
Test 2|test_2
Test 3|test_3
Test 4|test_4

It also works perfectly with this smarty generated list in the options field:

Code: Select all

{foreach item=i from=0|@range:9}
Test {$i}|test_{$i}
{/foreach}
But then I generate the same thing in a LISE instance and create a summary template called 'getItems':

Code: Select all

{foreach from=$items item=item}
{$item->title}|{$item->alias}
{/foreach}
And when I add this call in the Multiselect Box options field:

Code: Select all

{LISEinstancename template_summary='getItems'}
it doesn't work.
No options are generated in the content manager.

The same call on a page creates the key|value list perfectly.

As usual I assume I'm missing something simple.

Any ideas?

Cheers
Simon66
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGContentUtils Multiselect Box problem

Post by calguy1000 »

That won't work because content blocks are processed differently.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1785
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGContentUtils Multiselect Box problem

Post by DIGI3 »

Try calling it with {cms_module module='LISEinstancename' template_summary='getItems'}
Not getting the answer you need? CMSMS support options
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGContentUtils Multiselect Box problem

Post by calguy1000 »

I don't think that will work either. When the page template is compiled for use in the editor it uses a separate smarty instance that does not know anything about modules. Only the various {content_} plugins. This prevents side effects.

So module plugins, including {cms_module} will not execute.
And if it does work, I would not rely on it. as it is in fact a 'bug'.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Simon66
Power Poster
Power Poster
Posts: 250
Joined: Wed Aug 29, 2007 4:36 am
Location: Sydney Australia

Re: CGContentUtils Multiselect Box problem

Post by Simon66 »

Thanks guys,
I'm going to try a UDT to achieve the same thing.

Cheers
Simon66
Simon66
Power Poster
Power Poster
Posts: 250
Joined: Wed Aug 29, 2007 4:36 am
Location: Sydney Australia

Re: CGContentUtils Multiselect Box problem

Post by Simon66 »

Digi3, I did try your solution. You also mentioned it in this post:
viewtopic.php?f=7&t=78619

It does work, and I'll just have to hope this 'bug' doesn't get fixed any time soon.

Cheers
Simon66
Post Reply

Return to “Modules/Add-Ons”