[TYPO3-english] Disable caching of a plugin
    Simon Strandgaard 
    simon at bee3.com
       
    Mon Apr 19 13:19:46 CEST 2010
    
    
  
My plugin is cached, and I want it not to be cached.
I have tried changing addPItoST43's the last argument from 1 to 0
t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_myext_pi1.php', '_pi1',
'list_type', 0);
Then it's no longer cached and the generated html is good...
Except that it doesn't quite work.
The function addJsFile() no longer inserts any link to the javascript file.
The function setJS() no longer inserts any inline javascript.
The function addCssFile() no longer inserts any link to css file.
How to disable caching and still get javascript inserted?
My plugin code looks like this
function main($content, $conf) {
/*
SNIP
*/
$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
$relpath = t3lib_extMgm::siteRelPath('myext');
$pageRenderer->addJsFile($relpath . 'res/misc.js');
$pageRenderer->addCssFile($relpath . 'res/misc.css');
$GLOBALS["TSFE"]->setJS($this->extKey . $this->prefixId . '_' .
$content_uid, $some_inline_js_code);
return $this->pi_wrapInBaseClass($content);
}
-- 
Best regards
Simon Strandgaard
    
    
More information about the TYPO3-english
mailing list