[TYPO3] CSS from extension managed by core

Dmitry Dulepov [typo3] dmitry at typo3.org
Thu Aug 30 12:52:44 CEST 2007


Christian Lerrahn wrote:
> I'd like to generate some CSS in an extension from templates and then
> hand it over to the core to take care of it. Is that possible? I
> realise that I could just write my own temporary file which I then
> refer to in the header but I would like the core to take care of
> everything once the CSS is final. How do I do that?

Easy:

----------------------------
$generatedCss = '
BODY { }
H1 { }
';
$GLOBALS['TSFE']->setCSS('tx_yourext_pi1', $generatedCss);
----------------------------

-- 
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs


More information about the TYPO3-english mailing list