[TYPO3] Parsing CSS files - is it possible?

JoH info at cybercraft.de
Wed May 24 03:42:05 CEST 2006


>> Sorry? - What is so complex about 15 lines of TypoScript?
>> IMHO it's absolutely easy to understand and to implement this
>> snippet, since it works _exactly_ like the rest of the templating
>> stuff.
>>
> yeah - but only *after* i read it. i prefer php for dynamic things ;)
>> If this is what _prevents_ people from using TYPO3, I wonder what we
>> should do to get them back.
>>
> do not use typoscript for programming ;)

This is not programming but configuring things.
So IMHO this is what TypoScript was made for.

>> What would be their way of solving problems like this one?
>>
>> BTW: Do you know a better solution, that is as easy to code and
>> implement?
>>
> the actual scenario is not so clear to me but to my understanding that
> could do it:
>
> $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.

Exactly the same thing in my solution.
With two differences:
1. You can use my solution without PHP knowledge directly in your TS
template
2. You can easily use TS stuff like IMAGE, COA + getText Functions there

> if thats silly please forgive me - its very late an i just fiddled
> without many success on htmlarea configurations for the last few
> hours ;)

It's not silly, but just another way of ding things.
I would prefer the TS way though, while others prefer PHP.
But still I don't get the reason, why it should _prevent_ people from using
TYPO3, if they can chose their prefered way of doing things.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de





More information about the TYPO3-english mailing list