[FLOW3-general] .xml output
"Christian Müller (FLOW3 Team)"
christian.mueller at typo3.org
Mon Oct 8 19:10:16 CEST 2012
On 05/10/12 11:04, mario chiari wrote:
> Christian, All
>
>
> SOLVED!
> It was easy, but it seems I need a line more than you suggest.
> Now my xmlAction controller is:
>
> public function xmlAction(\Mario\Crono\Domain\Model\Crono $crono) {
> $this->response->headers->set('Content-Type:', 'application/xml; '.' charset=UTF-8'); <<<<< needed!
> $eventos = $this->eventoRepository->findByCrono($crono);
> $this->view->assign('eventos', $eventos);
> $this->view->assign('crono', $crono);
> }
>
> I also add
> protected $supportedMediaTypes = array('text/xml', 'application/xml', 'text/html', 'application/xhtml+xml');
Yep forgot that! Good that you found it anyway.
Cheers,
Christian
More information about the FLOW3-general
mailing list