[TYPO3-mvc] More magic needed: disableAllHeaderCode in easy?

Susanne Moog typo3 at susannemoog.de
Mon Jun 1 11:05:47 CEST 2009


Hi,

Xavier Perseguers schrieb:
> Hi,
> 
>>> thanks, that's exactly what I'm doing now. Not nice but working :-)
>>>
>>> Code:
>>> $this->view->assign('address', $address);
>>> header('Content-Type: text/x-vCard');
>>> header('Content-Disposition: attachment; filename= "vcard.vcf"');
>>> echo $this->view->render();
>>> exit;
>>>
>>
>> i agree that this is the way without loading complete CMS but i
>> dislike writing such code. If core does it, it would be better like
>> having a function: t3lib_div::printContentAndExit($content, $headerCode);
> 
> BTW, shouldn't be the view that issue the header stuff? I mean, the view
> is responsible for its content, and I guess the type of content is its
> problem too. If you want to change the type to generate a PDF, you
> should only have to change the view you use.

You are probably right, but as I don't know how to do things in my own
view (or how to get an own view), I'm doing it in the controller for now.

Regards,

Susanne

-- 
Susanne Moog
NEUSTA GmbH - www.neusta.de


More information about the TYPO3-project-typo3v4mvc mailing list