[TYPO3-mvc] render viewhelper with different format

Steffen Ritter info at rs-websystems.de
Mon Sep 13 15:33:02 CEST 2010


Am 13.09.2010 15:10, schrieb Thomas Hempel:
> Hi,
>
> is just ran into a problem with the render viewhelper.
>
> I have an action, let's call it "listAction". In that template I include
> a partial called "items".
>
> I call the action with the format "html" and "json". My problem is now,
> that I have to duplicate "items" partial because the view helper (or
> fluid) expects "items.json" instead of "items.html" (and vice versa of
> course).
> Both files are identical, because I use that to reload the items via JSON.
>
> Can this be solved in some way? I think the smartest solution would be
> to add the argument "format" to the render view helper, so I can decide
> it in my master template which one is used!?
>
>
> Best wishes,
> Thomas
hi, you can explicetely say render="items.html"

regards

Steffen


More information about the TYPO3-project-typo3v4mvc mailing list