[TYPO3-mvc] footer equivalent for addAdditionalHeaderData
Kerstin Eitner
eitner.kerstin at googlemail.com
Tue Nov 22 13:37:29 CET 2011
Hi Tim,
at my case i don't have to place the plugin more than once per page
(even if that would be great), but i have an option called "autoplay"
which decides if the slider should start automatically or not.
[..]
$data = $this->request->getContentObjectData();
$plugin_uid = $data['uid'];
$autoplay = $this->settings['slider_autoplay'];
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#slider_c' . $_uid . '").start({autoPlay: ' .
$autoplay . '});
});
</script>
In a file outside my extension i don't have access to
$this->settings['slider_autoplay'].
The value for the $_uid is already solved and displayed right.
I need a solution how to put that js-call within my extension to the
footer, so that it can be minified like the rest of my js.
Somebody any other ideas?
Greetings,
Kerstin
Am 20.11.2011 23:28, schrieb Tim Schoch | GSTALTIG:
> if you dont want to place the plugin more then once per page, you can set the uid in fluid.
> <script>var yourUid = {uid}</script>
> And it will be present in the javascript file.
> You can test that with alert( yourUid );
> (or console.log, if you use it)
>
> Tim
More information about the TYPO3-project-typo3v4mvc
mailing list