Created
October 3, 2012 21:34
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
version_compare(JVERSION, '3', 'ge') would work too :)