Support Joomla!

references:joomla.framework:application:jmenu-getactive

Table of Contents

getActive

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JMenu Method getActive Reference getActive() Never Work in Progress

Gets the active menu item.

The active menu reflects the link of the current page, provided there’s a link to it in one of the visible menus.

Syntax

object The &getActive ()

Examples

Example

// get the Singleton instance
$menu   = &JMenu::getInstance();

// get the active menu item
$active = &$menu->getActive();
echo '<a href="', $active->link , '">', $active->name ,'</a>';

Might create:

  <a href="index.php?option=com_content&view=article&id=25">
    About Joomla!
  </a>

 
references/joomla.framework/application/jmenu-getactive.txt (1061 views) · Last modified: 2007/08/15 14:48