[TYPO3-project-4-3] CSS and JS files get included in the wrong order if using the page-renderer

Susanne Moog typo3 at susanne-moog.de
Thu Nov 12 13:41:09 CET 2009


Hey,

Steffen Kamper wrote:
> Hi,
> 
> it's not complicate to get it ordered. First think about the priorities
> of your scripts.
> You have 4 sections which will be rendered in the order
> ###JS_LIBS###
> ###JS_INCLUDE###
> ###JS_LIBS_FOOTER###
> ###JS_INCLUDE_FOOTER###
> 
> also each section has the param 'forceOnTop' for higher priority scripts.
> 
> Look to pageRenderer class for details.
> 

I'm having a similar problem with CSS files atm. I include three CSS
files with TS:

page.includeCSS.file1-n ...

and then in my extension one with pagerenderer->addCssFile. the
pagerenderer file gets rendered first, before the others, but I'd like
to have css from extensions loaded last, as the general css files are
f.e. a reset.css or a commonlayout.css and ext-css is more specialized.

(same for JS, I load stuff like jquery etc. via TS, special things via
extension)

Is there a way to achieve this?


Best regards,

Susanne


More information about the TYPO3-project-4-3 mailing list