[TYPO3-mvc] TypoScriptViewHelper
Bastian Waidelich
bastian at typo3.org
Tue May 5 11:10:38 CEST 2009
Jeff Segars wrote:
>> <f:cObject typoscriptObjectPath="lib.my.header">{foo: 'my
>> header'}</f:cObject>
>> -> renders lib.my.header with no current value but field foo = "my
>> header"
>
> My only complaint here would be that people may be confused as to
> whether they're filling "current" or the data array. To me, its most
> natural to use "current" as a value within the tags and the data array
> as an attribute.
I get your point, I don't like to use parameters differently depending
on their type neither.
But I think it's a slightly different situation in this case:
You always put the value you want to format/render within the tags. Only
if it's an array or object, you can(!) specify which key/property should
contain the "main" or current value.
There will be more view helpers that work differently depending on the type.
E.G. the date view helper will be able to format DateTime objects as
well as string representations, and I think this makes sense.
Bastian
More information about the TYPO3-project-typo3v4mvc
mailing list