Sabuj Kundu 14th Nov 2013

Sometimes we need to check the current joomla version or if current joomla(installed joomla) version is less than or greater than any specific version. We can do this easily with the following code snippet.


        //checking if installed joomla version is less  3.0   
        if ( version_compare( JVERSION, '3.0', '<' ) == 1) {             
             // do something for joomla version less than 3.0
             //  JHTML::_('behavior.framework', true);
         }
         else{
             //do something for j3.0 or more
             JHTML::_('jquery.framework');
         }

If useful don’t forget to say thanks and share 😛