Robert Granlund
asked on
Replace Joomla Core jQuery Library
Joomla: "UI should be replacement of Joomla core, loaded at component or template level" Can someone explain to me the best way to go about replacing the Joomla core jQuery UI with another UI?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, but you'd have to use an event, such as onContentPrepare. Inside your event handler, examine whatever data points you need, then manipulate the document's assigned scripts from there. You could not use the override method here, since they would be auto-detected and loaded every time. This also assumes the scripts have been loaded/assigned to the document at some point.
A better alternative is to modify the pages around a single version, and use just that version. It seems to me you are choosing to hammer your way through a brick wall instead of going through the gate two feet to your left.
A better alternative is to modify the pages around a single version, and use just that version. It seems to me you are choosing to hammer your way through a brick wall instead of going through the gate two feet to your left.
ASKER
@Steve, So the UI should be replacement of Joomla core, loaded at component or template level?
If you need to selectively replace it, you would include the special version with your module. When you detect the need to execute the replacement, remove the core script reference from the document and replace it with a reference to yours.
If you are going to replace the script wholesale, then you could just drop your version into your template and let Joomla's override system handle it.
If you are going to replace the script wholesale, then you could just drop your version into your template and let Joomla's override system handle it.
ASKER