[TYPO3-mvc] Skip rendering of the view
Henjo Hoeksma
me at henjohoeksma.nl
Thu Dec 22 10:45:43 CET 2011
Thanks guys. The return was what did the trick. Got it working now.
@Claus: no time to put something like this in a widget for the coming time
I'm afraid!
Kind regards,
Henjo
Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.
On Thu, Dec 22, 2011 at 10:19, Sebastian Schreiber <me at schreibersebastian.de
> wrote:
> Am 22.12.2011 10:16, schrieb Claus Due:
>
> On Dec 22, 2011, at 10:03 AM, Sebastian Schreiber wrote:
>>
>> Just put it a return or return NULL (it´s actually the same) in your
>>> action and you should be fine.
>>>
>> And perhaps also use a typeNum to suppress the normal page rendering
>> since it looks like Henjo would like that gone too :)
>>
>> Example, ext_localconf.php
>> t3lib_extMgm::addTypoScript($_**EXTKEY,'setup',
>> [GLOBAL]
>> page = PAGE
>> page.typeNum = 0
>> page.5 = USER
>> page.5.userFunc = tx_extbase_core_bootstrap->run
>> page.5.extensionName = Fed
>> page.5.pluginName = API
>> page.10>
>> ', TRUE);
>>
>> Perhaps a Fluid Widget could even be used (if your content output is not
>> cached). In rough terms it would require a Widget with AJAX enabled, a
>> WidgetController with an action to output the .vcf and finally
>> using<f:widget.link action="theDownloadAction" ajax="TRUE">link to
>> file</f:widget.link> inside the template file for the Widget. This is a
>> more complex solution but it gets around the typeNum issue.
>>
>> Who knows - perhaps the Widget could also be used as a general
>> .vcf-download component others might find useful. I'll gladly accept is as
>> a donation to FED ;)
>>
>> Cheers,
>> Claus
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>
> of course. And additionally you should also send the correct response
> headers in the action or combined with your PAGE-TS-Settings:
>
> Something like:
> $this->response->setHeader('**Content-Disposition', 'attachment;
> filename="' . $fileName . '.vcf"');
> $this->response->setHeader('**Content-Length', strlen($vCardString));
> $this->response->setHeader('**Connection', 'close');
>
>
> --
> Sebastian Schreiber
> (Medieninformatiker B.Sc.)
> (TYPO3 Certified Integrator)
>
> Schanzenstraße 27, Schlosserei 4
> D-51063 Köln
>
> T 0221 677 88 541
> M 0176 431 05 790
>
> Skype schreibersebastian.de
>
> me at schreibersebastian.de
> www.schreibersebastian.de
>
> Steuernummer: 217 / 5269 / 4675
>
> ______________________________**_________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>
More information about the TYPO3-project-typo3v4mvc
mailing list