[TYPO3-mvc] Get json from controller action

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Jun 17 15:35:20 CEST 2010


Hi,

> $json = json_encode($arraytools);
> $this->view
> 	->assign('json', $json)
> 	->assign('extRelPath', t3lib_extMgm::extRelPath($this->extKey));
>
> in the fluid template is just {json}

a) using return $json in your controller is absolutely OK to do
b) If you still like to use a FLUID template try this in your template:
<f:format.html parseFuncTSPath="" >{json}</f.format.html>


-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list