[TYPO3-dev] Including jQuery in plugin - Best practice

Xavier Perseguers xavier at typo3.org
Sun Oct 30 08:16:32 CET 2011


Hi,

> I personally like extensions where site admins can choose to deactivate
> the jQuery inclusion in the extensions configuration. The benefit is
> that if your site or another ext already uses jQuery, you can easily
> avoid multiple inclusions without fiddling about TypoScript to remove them.

This is the point: let the user deactivate your specific inclusion of 
jQuery.

> Or, if you do the inclusion with TypoScript, do it at least by using
> setup.txt and explain in your ext-documentation how to deactivate it if
> required.

This is my preferred way of including it (referencing a CDN-hosted 
version) because the user can then choose to change the reference to 
some local version, to some other CDN-hosted version or remove it 
whenever the jQuery library is already included by some extension such 
as t3jquery or by some manual script inclusion in some other part of the 
configuration.

Cheers

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org




More information about the TYPO3-dev mailing list