Adding additional widget support to existing jquery ui library in Concrete5

Permalink
What is the best way to add support for jQuery Tabs without running into the potential for having duplicate loading of jQuery UI libraries when logged in to concrete5?

I need tabs support on a couple of my single pages, but adding the script generated from the jQuery site to the header of my theme doesn't seem to do the trick...I'm assuming it's because Concrete5 is already loading jQuery UI and there is a conflict.

I can load the script fine by doing a conditional check to see if a user is logged in, and, if not, load the needed javascript—everything works fine this way. But THEN, when logged in the tabbed ui elements all break.

Any ideas? Thanks all =)

 
JohntheFish replied on at Permalink Reply
JohntheFish
In the single page controller, you need an on_start method with addHeaderItem for jquery.ui.js and jquery.ui.css. That will load the concrete5 versions of both. There are examples in the load ui addon.
http://www.concrete5.org/marketplace/addons/load-jquery-ui/...

If you want some ui styling other than c5 dashboard, then you will need to generate a ui theme that is namespaced to your page within an #id and load the css for that instead.

Unless you want higher level tabs functionality, its only a few lines of jQuery to diy. See
http://www.concrete5.org/documentation/how-tos/developers/use-tabs-...