If I want to use jQuery, am I responsible for downloading it myself and placing it in my mysite/javascript directory or does SilverStripe do anything cleverer than that? I wondered why jQuery was particularly recommended if there wasn't any specific support for it.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
I wondered why jQuery was particularly recommended if there wasn't any specific support for it.
jQuery is recommended since a lot of the modules include jQuery (userforms, forum are 2 that I know..) so if you plan on using any modules it's likely it'll include jQuery if it has any front end javascript.
You are responsible for putting your plugins in the mysite folder but take a look first at sapphire/thirdparty. It has a bundle of plugins for jQuery that are used in the CMS so you can include those if you want.
Use <% require javascript(mysite/javascript/plugin.js %> to include plugin JS. Docs: http://doc.silverstripe.org/sapphire/en/reference/requirements
Ah... that makes sense. Thanks!
I didn't know about the thirdparty directory at all.
I downloaded the latest jQuery into a folder in mysite and it all works nicely using 'requirements', so I am happy :)