[TYPO3-mvc] TypoScript manipulation per object property

Helmut Hummel helmut at typo3.org
Fri Jul 23 19:10:54 CEST 2010


Hi Franz,

On 23.07.10 02:05, Franz Koch wrote:
> 
>> What about having something like this:
>>
>> $view->assign('myobject',$myobject,'Tx_Fluid_View_PropertyDecorator');
>>
>> (Third parameter optional)
> 
> I don't like having that logic in the controller. What if one likes to
> use a decorator in a view of a foreign extension? So this should really
> be moved to the view I think.

Hm, right.

> how about f:format.decorate ;) I know that this conflicts with the
> overall idea of viewHelpers that should be used to format content - but
> having TS processing easily available for all properties of a object is
> just to handy. Basic formatting should of course still be done in the
> template and via dedicated viewHelpers.
> 
> 
> <f:format.decorate use="{myObject}" as="decoratedObject"
> using="plugin.tx_myext.decorations">
> {decoratedObject.title}
> {decoratedObject.description}
> </f:format.decorate>

I like this one. It's clear and straightforward.

Regards Helmut




More information about the TYPO3-project-typo3v4mvc mailing list