[TYPO3-mvc] footer equivalent for addAdditionalHeaderData

Kerstin Eitner eitner.kerstin at googlemail.com
Fri Nov 18 16:13:35 CET 2011


Hi Tim,

i can't put the js code in a file because the script call needs to be 
dynamic like in that example:


$data = $this->request->getContentObjectData();
$uid = $data['uid'];

<script type="text/javascript">
             jQuery(document).ready(function(){
             jQuery("#slider_c' . $_uid . '").start({autoPlay: ' . 
$autoplay . '});
             });
</script>


Furthermore i use the typo3 internal minify and merge options 
(config.minifyJS, config.concatenateJs) and that's why i don't want to 
use a further extension for that.


Greetings,
Kerstin



Am 18.11.2011 15:45, schrieb Tim Schoch | GSTALTIG:
> You could put it in a .js file and include it with TypoScript:
> page.includeJsFooter.yourext = EXT:yourext/Resources/Public/JavaScript/yourext.js
> This doesn't work though if you want to manipulate the script in extbase/fluid first.
>
> Did not test this:
> maybe you can just place it inline (eg. a partial) and use scriptmerger (@see TER) and to merge inline javascript to a single
> file at the bottom of your code.
>
> Tim



More information about the TYPO3-project-typo3v4mvc mailing list