[TYPO3-50-general] How to get JSON View

Andreas Lappe nd at off-pist.de
Fri Oct 30 09:36:22 CET 2009


On 29.10.09, Karsten Dambekalns wrote:
> Hi.
> On 13.09.09 14:35, Andreas Lappe wrote:
> > I wonder how to get a JSON view? I was looking at TYPO3CR which has a
> > View directory and then uses ShowJSON.php and ListJSON.php to display
> > it. But I can't figure out why those files are used... and how to adapt
> > it to my project.
> By following the naming conventions this happens automagically. Check if
> reading
> http://flow3.typo3.org/documentation/manuals/flow3/flow3.mvcframework/#d0e2087
> explains it enough for you...

Hey Karsten,

that helped me to get the view but I'm running into some more problems.
Again working along TYPO3CR you used a special service controller to
output the JSON and therefor used the showAction to write into the
view-array (node/nodes).

I had hoped to use my existing showAction (for html) to output the JSON,
but with $this->view->assign('lala', $lala) I cannot use $lala in view.
Is there another special/magic way to do this?

So long
Andy
-- 
``You have just breathed in a nitrogen-atom that passed through the right
  lung of the third iguana-don to the left of the tall cikap-tree.´´
  [Richard Dawkins]


More information about the TYPO3-project-5_0-general mailing list