[TYPO3-dev] Best practice for including JS / CSS from an extension
Fabien Udriot
fudriot at omic.ch
Wed Jun 15 11:51:02 CEST 2011
Hi!
>
> There's of course other techniques, but IMO the best solution is your 3rd
> (viewhelper in template), as your html template and your javascript code are
> strongly linked. The good part of your 3rd solution (wich I used since years
> in fact) is that if you want another layout or behaviour, you just have to
> change your template (and no typoscript or php code to override)
>
> I use that kind of solutions since a few years throught my own library, and
> it works very well.
Well... I see some drawbacks.
For extensions that are developed on your own and are not published on the TER, I think this would
make sense as there will be very likely other changes in the template from one project to another.
But for public extension being published, this is not the ideal case as it will occur more work when
the extension will get updated.
Fabien
More information about the TYPO3-dev
mailing list