Discussion:
[TYPO3-english] with multiple parameters in typoscript for f:cObject viewhelper ?
bernd wilke
2013-07-08 13:15:17 UTC
Permalink
is it possible to transfer multiple paramters from a fluid-template to
the typoscript?

with just one parameter you have the following possibilities:

<f:cObject typoscriptObjectPath="lib.test">{data.test}</f:cObject>
<f:cObject typoscriptObjectPath="lib.test" data="{data.test}" />
{f:cObject(typoscriptObjectPath:'lib.test', data:data.test)}
{data.test ->f:cObject(typoscriptObjectPath:'lib.test')}

lib.test = TEXT
lib.test {
current = 1
wrap = (|)
typolink.parameter = 10
}

but if I want the link-param be specified in the template?

something like:
<f:cObject typoscriptObjectPath="lib.test"
link="{data.link}">{data.test}</f:cObject>
or
{f:cObject(typoscriptObjectPath:'lib.test', data:data.test, link:data.link)}


bernd
--
http://www.pi-phi.de/cheatsheet.html
Dirk Wenzel
2013-07-24 17:55:06 UTC
Permalink
Post by bernd wilke
is it possible to transfer multiple paramters from a fluid-template to
the typoscript?
Did you try to pass an array?

I guess it could be build with an alias viewhelper
<f:alias map="{data: {test: 'testValue', link: 'linkValue'}}">
<f:cObject typoscriptObjectPath='lib.test' data="{data}" />
</f:alias>

Kind regards
Dirk
bernd wilke
2013-07-25 11:34:23 UTC
Permalink
Post by Dirk Wenzel
Post by bernd wilke
is it possible to transfer multiple paramters from a fluid-template to
the typoscript?
Did you try to pass an array?
I guess it could be build with an alias viewhelper
<f:alias map="{data: {test: 'testValue', link: 'linkValue'}}">
<f:cObject typoscriptObjectPath='lib.test' data="{data}" />
</f:alias>
you don't need the map (at least in 6.1, which I tested):

<f:cObject typoscriptObjectPath="lib.arraytest" data="{a:'abc',b:'xyz'}"
Post by Dirk Wenzel
inside text</f:cObject>
ib.arraytest = COA
lib.arraytest {
10 = TEXT
10.field = a
10.wrap = /|/

20 = TEXT
20.field = b
20.wrap = \|\
}

gives:
/abc/\xyz\

'inside text' is ignored!

bernd
--
http://www.pi-phi.de/cheatsheet.html
Loading...