[TYPO3] Parsing CSS files - is it possible?

Irene Höppner ih at abezet.de
Wed May 24 10:41:34 CEST 2006


> $GLOBALS['TSFE']->additionalHeaderData[$this -> prefixId]  =   
> '<style>#bla.background { background: url('.getBGImage($path).';  
> }</style>';
> getBGImage($path) {
>     simple switch looking for the path and returning image name here...
> }
>
> that way you have only one stylesheet and simply override the style  
> declaration that is necessary.

hmmm... and making an extension, including that function somewhere in  
typoscript, finding the right global variable, maybe getting the image  
 from the rootline is really less difficult than something like this (which  
ends in the same inline style):

page.headerData.100 = TEXT
page.headerData.100 {
     	data = levelmedia : -1
	wrap = <style>#bla.background { background: url('../../uploads/media/ |  
';}</style>

}

What I really like at Joeys solution is, that you can define colors in the  
typoscript-constants, but keep the CSS-Stuff separated for someone who is  
not familiar with Typo3 or php...

IMHO using a standardized interface (like TypoScript) or not is a question  
of quality. And understanding TypoScript is a question of reading and  
training - what again means to use it ;-).

Greets: Irene

-- 
Irene Höppner
A.BE.ZET GmbH
http://www.abezet.de



More information about the TYPO3-english mailing list