[TYPO3-mvc] Skip rendering of the view

Claus Due claus at wildside.dk
Thu Dec 22 10:16:06 CET 2011


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


More information about the TYPO3-project-typo3v4mvc mailing list