faysalmirmd

joomla home page detection code

May 13th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. $app    = JFactory::getApplication();
  2.         $mymenu = $app->getMenu();
  3. //        $mymenu = JSite::getMenu();
  4.  
  5.  
  6.         if (isset($mymenu->getActive()->id) && isset($mymenu->getDefault()->id)) {
  7.             $active_id  = intval($mymenu->getActive()->id);
  8.             $default_id = intval($mymenu->getDefault()->id);
  9.             if (($active_id == $default_id) && !$skipfront) {
  10.                 return;
  11.             }
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment