[TYPO3-core] RFC: #9149: Additional Stylesheets in template.php

Martin Kutschker masi-no at spam-typo3.org
Fri Aug 29 22:27:45 CEST 2008


Steffen Kamper schrieb:
> Benjamin Mack schrieb:
>> Hey Steffen,
>>
>> very nice work!
>>
>> Some things:
>>
>> 1. I'd like to have an interface similar to loadJavascriptLib() called
>> "addStylesheet()". What do you think? (It's just an idea) :)
>>
>> 2. could we make it so that styleSheetFile1 and styleSheetFile2 are
>> merged to that new array so that we can phase these variables out
>> (maybe set them to deprecated and rewrite e.g. t3skin to use the new
>> interface). What do you think?
>>
>> greetings from Montana :)
>> benni.
>> -SDG-
>>
> 
> Hi Urlauber :-)
> 
> good idea. I modified the patch so you add CSS files in the same mannar
> like JSFiles:
> $this->doc->loadCSSfile('contrib/extJS/resources/css/ext-all.css');
> 
> In template there is a check to prevent double include.
> 
> For stylesheet and stylesheet2 I added a special parameter, so they will
> be included befor the other ones.
> 
> To force a stylesheet to be firstposition, you can use this parameter:
> $this->doc->loadCSSfile('contrib/extJS/resources/css/ext-all.css', true);
> 
> new patch is attached.

Looks ok, but wouldn't the
array_merge(array("newkey"=>"newvalue"),$arrayone) trick work instead of
the double array_reverse (which looks so odd)?

Masi


More information about the TYPO3-team-core mailing list