Skip to content

Instantly share code, notes, and snippets.

@kyleledbetter
Created October 3, 2012 21:34
Show Gist options
  • Save kyleledbetter/3830005 to your computer and use it in GitHub Desktop.
Save kyleledbetter/3830005 to your computer and use it in GitHub Desktop.
Conditionally load Joomla 3.0 javascript in a template that will support 2.5 as well
// Settings for Joomla 3.0.x
if (version_compare(JVERSION, '3.0.0', 'ge')) {
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
}
// Settings for Joomla 2.5.x and under
else {
// Do non-3.0 stuff here
}
Copy link

ghost commented Oct 3, 2012

version_compare(JVERSION, '3', 'ge') would work too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment