[TYPO3-mvc] fetch element from array based on object.property
Martin Kutschker
masi-no at spam-typo3.org
Thu Apr 1 12:00:28 CEST 2010
Peter Niederlag schrieb:
> Hello,
>
> I assign an array to the view:
>
> $list = array (
> 'first' => 'Hello',
> 'second' => 'World'
> )
>
> Now I'd like to fetch a specific element from this array in my FLUID
> template:
>
> {list.second} -> WORKS
> {list.{object.property}} -> doesn't work :-<
>
> However IMO it is a quite common task to fetch a specific element based
> on some other value ("object accessor").
>
> Any hints/suggestions?
Does FLUID support assignments within the template?
Something like that:
$temp = {object.property}
{list.temp}
I have stumbles occasionally upon a similar problem in Smarty and could solve it by the mentioned
statements.
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list