[TYPO3-mvc] IMAGE cObject and right viewhelper interaction [confused!!!]

Dmitri Pisarev dimaip at gmail.com
Sat Jun 12 12:31:31 CEST 2010


On 12.06.2010 13:47, Franz Koch wrote:
> Hey there,
>
>> I have written the viewhelper that takes image src and other parameters,
>> and then renders an IMAGE cObject. However I have a conceptual problem
>> how to connect it in a clean way with StoreReadResponse viewhelper.
>> I need to have it to render the Article.image property before it gets to
>> the StoreReadResponse viewhelper.
>> Is there a way to modify other fluid variables from viewhelper?
>> Is there a way to pass output of one viewhelper to another (to chain
>> them)?
>>
>> Ofcourse I can do the TS processing in the $articel->getImage(), but,
>> IMO, it's mixing of model and view, as the html rendering belongs to the
>> view... Or am I wrong and it's okay to do it via the getter?
>>
>> Or am thinking totally in the wrong direction?
>> So guys, please help me solve it and I shall commit it to my library
>> extension.
>
> although I don't understand your question as I don't know the
> StoreReadResponse viewHelper, you can "chain" viewHelpers using the
> shorthand syntax of FLUID. Example:
>
> <f:yourViewHelper value="{f:anotherViewHelper(property:value,
> property2:value)}" />
>
>
Thanks a lot for your reply, Franz. I shall try to use it in my case.
BTW, seems like I have reinvented the wheel... there is already the 
image viewhelper. I was just looking at documentation from flow3, 
instead of looking at the source code of fluid.

As for the StoreReadResponseViewHelper, it receives array of objects as 
an  argument, and outputs them as JSON response.
Of course I can rewrite this functionality in my own viewhelper, but I 
just want to know, what is the best way to do it?

@Dennis, how would you do it?

Dmitri.


More information about the TYPO3-project-typo3v4mvc mailing list