Topic on Extension talk:Widgets/archive 2

How to pass an array into widget

1
JeremiPlazas (talkcontribs)

Hi there,

I noticed in the doc it says:

"If you use the same parameter multiple times, the widget will get an array of values. You can use foreach to go through the array."

That's nice for manually specifying values. But actually passing a list of values into a widget gets more complicated and i have not yet been successful at transforming

one,two,three

into

|arrayValue=one|arrayValue=two|arrayValue=three

In order to then feed into the widget and indeed get a working array that you can iterate through.

I've tried arraymap[template] without luck. The pipe gets parsed too late.

Any thoughts, ideas? Thanks!

Reply to "How to pass an array into widget"