[TYPO3-dev] Best practice for including JS / CSS from an extension

Peter Niederlag typo3-list at niekom.de
Tue Jun 14 13:24:13 CEST 2011


Hallo,

Am 14.06.2011 12:35, schrieb Jigal van Hemert:
> Hi,
[...]
> Maybe you can use the approach I always use for pi_base extensions
> (thanks to Dmitry for this):

while this is very nice and backwards compat to old TYPO3 versions 
starting from TYPO3 version 4.3 there is an improved API inside 
t3lib_pageRenderer.

$GLOBALS['TSFE']->getPageRenderer->add*()

for example addCssFile() and similar.

Pro: you don't have to take care of the proper markup and just provide 
the file-name.

Greets,
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *




More information about the TYPO3-dev mailing list