ext_localconf.php
## Extending TypoScript from static template uid=43 to set up userdefined tag: t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','tt_content.CSS_editor.ch.tx_testering_pi1 = < plugin.tx_testering_pi1.CSS_editor',43); t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.tx_testering_pi1.php','_pi1','list_type',1); ## Extending TypoScript from static template uid=43 to set up userdefined tag: t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','tt_content.CSS_editor.ch.tx_testering_pi2 = < plugin.tx_testering_pi2.CSS_editor',43); t3lib_extMgm::addPItoST43($_EXTKEY,'pi2/class.tx_testering_pi2.php','_pi2','list_type',0);
class.tx_myextension_pi?.php
/** * Plugin 'cached' for the extension. */ class tx_myextension_pi1 extends tslib_pibase { // Same as class name var $prefixId = 'tx_myextension_pi1'; // Path to this script relative to the extension dir. var $scriptRelPath = 'pi1/class.tx_myextension_pi1.php'; var $extKey = 'myextension'; // The extension key. |
/** * Plugin 'uncached' for the extension. */ class tx_myextension_pi2 extends tslib_pibase { // Same as class name var $prefixId = 'tx_myextension_pi2'; // Path to this script relative to the extension dir. var $scriptRelPath = 'pi2/class.tx_myextension_pi2.php'; var $extKey = 'myextension'; // The extension key. |
soll eine Extension den Cache dynamisch für eine gesamte Seite deaktivieren kann sie dies mit folgender Anweisung machen:
$GLOBALS['TSFE']->set_no_cache();
ACHTUNG!: Damit wird die gesamte Seite nicht gecacht. Wird die Extension in diesem Modus auf allen Seiten benutzt wird so das gesamte Caching deaktiviert.
Möchte man nur die Ausgabe des Plugins einmalig vom Caching ausnehen kann man das mit folgedem Code machen:
if ($this->cObj->getUserObjectType() == tslib_cObj::OBJECTTYPE_USER) { $this->cObj->convertToUserIntObject(); }
Ansonsten muss das Plugin erstmal als USER (cachable) deklariert werden.