[TYPO3-dev] Plugin Counter: How often a plugin was inserted on a page
    Stefan Frömken 
    firma at sfroemken.de
       
    Thu Jun 18 13:16:18 CEST 2009
    
    
  
Hello group,
I just wrote an extension and I need an (loop)-counter, how often my 
extension was included on just one page (not whole webpage). This 
counter is important for my JavaScripts.
For now I wrote a comment like this "/* PluginCounter=1 */" into the 
header with additionalHeaderData[100].
When my extension was inserted twice, my current PHP-Script searches for 
my comment in additionalHeaderData[100] (preg_match/preg_replace) and 
increments my pluginCounter.
OK...it works...and it is even if my plugin was included as Plugin or as 
ObjectPath (lib.), but I think there is a better way/TYPO3-variable.
Maybe you have a shorter way for me and my extension sfslideshow.
Many thanks
Stefan
    
    
More information about the TYPO3-dev
mailing list