[TYPO3-dev] includeJS from frontend plugin
Dmitry Dulepov [typo3]
dmitry at typo3.org
Sun Sep 14 20:06:52 CEST 2008
Hi!
Xavier Perseguers wrote:
> How may I include a JS (in <head>) from my plugin content generation
> method?
>
> I do not want to force my users to create a template extension and
> manually add it whenever they use my plugin on a given page.
>
> If it's not possible, I'll add a <script> block before my content but it
> won't be as nice as it will be added once for each of my plugin on that
> page.
Check how comments extension does it. Search pi1 code for additionalHeaderData and see how to do it flexibly and without forcing the script.
More details will be in the book ;)
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/
More information about the TYPO3-dev
mailing list