[TYPO3-mvc] create array as viewhelper argument

Thomas Allmer at at delusionworld.com
Mon Feb 28 15:53:41 CET 2011


On 28.02.2011 15:08, Thomas Mammitzsch wrote:
> i wonder if it is possible to build an argument array for a fluid
> viewhelper like link.action. Thats what i tried, but it didn't work:
>
> <f:link.action action="myaction" controller="mycontroller"
> arguments="{mykey : myvalue}">my link</f:link.action>

why are you trying to do?

you probably only forgot the "'" around myvalue? means
arguments="{mykey : 'myvalue'}

<f:link.action action="list" arguments="{format: 
'table'}">table</f:link.action>
which gives you the "same" link as
<f:link.action action="list" format="table">table</f:link.action>

or you can just give "plain" params...
<f:link.action action="list" additionalParams="{mykey: 'myvalue'}">my 
link</f:link.action>

maybe this helps...

cheers
-- 
+---------------------------------+-----------------------------------+
| Thomas Allmer                   |   http://www.delusionworld.com    |
| E-mail: at at delusionworld.com    |   phone: +43 699 16217064         |
+---------------------------------+-----------------------------------+


More information about the TYPO3-project-typo3v4mvc mailing list