[TYPO3-dev] Best practice for including JS / CSS from an extension
Fabien Udriot
fudriot at omic.ch
Tue Jun 14 11:32:32 CEST 2011
> Conclusion:
>
> Unless there are other techniques, the best approach I see so far, is to have two Static TypoScript
> files:
>
> - EXT:foo/Configuration/TypoScript/setup.txt -> contains global configuration, loaded on root page
> - EXT:foo/Configuration/TypoScript/header.txt -> HTML header inclusion, loaded on the same page of
> the extension.
Well... it must be put in separate folders the way it is currently implemented
- EXT:foo/Configuration/TypoScript/setup.txt
- EXT:foo/Configuration/TypoScript/Header/setup.txt
Loaded by the following PHP in @ext_tables.php@
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Calendar Display: configuration');
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Header', 'Calendar Display:
JavaScript + CSS loading');
More information about the TYPO3-dev
mailing list