Producing a sortable list by ECB from LinkMgr

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Producing a sortable list by ECB from LinkMgr

Post by Guido »

Hi,

I am trying to add a content block to my page template via ECB. I want it to be a sortable list, which retrieves its values from the Link Mgr module. I tried making a UDT, tried assigning the values from the LinkMgr call to a value and then passing it on to the ECB content block call, but it always remains empty.

When I use "print_r" on the var I create (or just call the UDT), it produces the comma separated list I want, but somehow ECB doesn't like it. Anyone have any thougts on this?

I know I could use Advanced Content for this, but this is a too heavy-weight module for what I'm trying to do in my opinion.

An example:

Code: Select all

{content_module module="ECB" field="sortablelist" block="testsortablelist" label="Test lijstsortering" values=test1=Test 1,test2=Test 2}
Works as expected, but

Code: Select all

{assign var='list' value="test1=Test 1,test2=Test 2"}
 {content_module module="ECB" field="sortablelist" block="testsortablelist" label="Test lijstsortering" values=$list}
doesn't.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Producing a sortable list by ECB from LinkMgr

Post by velden »

Seems like assign a smarty variable in a template does not work well for using in the backend.

Consider using a UDT and and use the udt parameter?
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: Producing a sortable list by ECB from LinkMgr

Post by Guido »

Thanks for your reply.

I did create a UDT, but ran into the same problem. I designed the UDT so it would output the same comma separated list. I'm not sure if this is the way to go, since for a different field selector the developer requires an array when you use the 'udt' method.

For the sortable list however, there are no specifications in the help. And, moreover, I suck too much at programming to create an array from a UDT ;)
Post Reply

Return to “Modules/Add-Ons”