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

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Sun Nov 8 23:42:52 CET 2009


Hello!

I'm including JS and CSS files using 
$GLOBALS['TSFE']->getPageRenderer()->addJsFile($file); inside a 
user-function.

For my surprise the order of the files in the source is the following:

<head>
	<script src="$file" type="text/javascript"></script>
	<script src="reset.js" type="text/javascript"></script>
	<script src="common.js" type="text/javascript"></script>
</head>

The files 'reset.js' and 'common.js' were defined inside the
TYPO3 page object using typoscript.

Imho the files defined in the page object should be renderer
BEFORE all other includes done by the API inside hooks etc.

Since I don't know how the page object is called in the typoscript,
I can't add my extension JS-files using typoscript.

Is there any other solution to get a correct source-order for this?

Thanks a lot!


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