How to include jQuery UI in 5.7?

Permalink 1 user found helpful
In 5.6 we used johnthefish's jQuery UI plugin to ensure that UI was included on the view of a page for viewers. It doesn't support 5.7 and I need to know what the best way to include jQuery UI is. Is there a proper way without hacking anything up?


View Replies: View Best Answer
MrKDilkington replied on at Permalink Best Answer Reply
Hi WebSolutions,

Do you need jQuery UI for logged in users or normal viewing of the web page?

In 5.7, jQuery UI is an asset that is part of concrete5.

You can use your theme page_theme.php to require (or provide) it, so that it is loaded with your pages.

This video covers the topic of using assets.

Here is a list of concrete5 5.7 assets.

This is an example page_theme.php that is part of the Elemental theme.
WebSolutions replied on at Permalink Reply
Excellent, thanks!
WebStudioEast replied on at Permalink Reply
$this->requireAsset('javascript', 'jquery');
jgalat replied on at Permalink Reply
I know this is old but I was having a terrible time including jquery-ui for a datepicker when my admin user was not logged in. You need to add it in your controller using


That's it.