[TYPO3-mvc] render viewhelper with different format
Thomas Hempel
thomas at typo3-unleashed.net
Mon Sep 13 15:10:59 CEST 2010
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
More information about the TYPO3-project-typo3v4mvc
mailing list