[TYPO3-mvc] Re: Setting pagetitle of cached extension

Philipp philippwrann at gmx.at
Tue Aug 27 08:19:01 CEST 2013


To set a pagetitle AND make indexing possible the action has to be cacheable.

Per default all plugin Controller/Action Combinations are cacheable, to make them UNCACHED you have to define the Controller/Action Combination in the second array in \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin()

To enable the indexing you have to configure it via TS (config.index_enable) and wrap the sourcecode that should be indexed with the indexing comments.

To alter the pagetitle of a cached page you have to do (like you have done it):
$GLOBALS['TSFE']->page['title'] = $title;
$GLOBALS['TSFE']->indexedDocTitle = $title;

I think you just misunderstood...
cached action:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
$VendorName.'.'.$_EXTKEY,
$pluginName,
array('Person' => 'show')
);

uncached action:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
$VendorName.'.'.$_EXTKEY,
$pluginName,
array('Person' => 'show'),
array('Person' => 'show'),
);

The second array combinations are uncached.


More information about the TYPO3-project-typo3v4mvc mailing list