Jquery and 5.7.4
Permalink 1 user found helpful
Hey All - I'm confused, does concrete no longer supply jquery to a site? I started building a theme that required a few jquery tricks and upon signing out, I see jquery is missing.
1) Do I now have to provide jquery manually for my theme?
2) What is the best way to do this? Asset Registration is sincerely confusing for me - can I not use the jquery file that is shipped with concrete?
1) Do I now have to provide jquery manually for my theme?
2) What is the best way to do this? Asset Registration is sincerely confusing for me - can I not use the jquery file that is shipped with concrete?
Thanks - I started figuring it out - lots of changes...
I also had this issue, what I ended up doing was taking my page_theme file and adding
Just because I also needed jQuery UI
public function registerAssets() { $this->requireAsset('css', 'font-awesome'); $this->providesAsset('javascript', 'jquery'); $this->providesAsset('javascript', 'jquery.ui'); $this->providesAsset('javascript', 'bootstrap/*'); $this->providesAsset('css', 'bootstrap/*'); } }
Just because I also needed jQuery UI
yes, you can use the jquery file that is shipped with concrete5, you only need to add the following code to your page_theme.php file:
I understand it can be confusing at first, but actually Asset Registration is very helpful once you get used to it.
I think this page in the documentation might be of help (it also shows how to include the jquery file that comes with the core without using Asset Registation, though I'd recommend you to give it a try):
http://www.concrete5.org/documentation/developers/5.7/designing-for...
Jordi