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

Susanne Moog typo3 at susannemoog.de
Mon Jun 1 09:44:43 CEST 2009


Hi,

Xavier Perseguers schrieb:
> Hi,
> 
> Steve Ryan wrote:
>> Hi Susanne,
>>    I've occasionally used
>>
>> echo "myoutput";
>> exit;
>>
>> instead of a different page type although it seems to me that setting
>> up a page type with header data disabled as you suggested is the way
>> to go.
> 
> Yes, I did that recently to let users download a generated Excel file.
> Send headers and simply exit. This is a bit rude but works actually ;-)

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;

Cheers!

Susanne

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


More information about the TYPO3-project-typo3v4mvc mailing list