0
votes

I have a JMenu object (from standard mod_menu in Joomla 2.5) but I don't know how to retrieve its title, does anyone know how to do this? I retrieved my active menu in this way:

$menu = $app->getMenu();

It was easy to get every menu item or module param but it seems impossible to get the menu title. Thanks in advance.

1

1 Answers

0
votes

I haven't tested this but have a feeling it might work:

jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule( 'mod_menu' );
echo $module->title;

If there is more than one instance of the module, then you can be more specific by declaring for example the ID of the module:

$module = JModuleHelper::getModule( 'mod_menu', '88' ); //change 88 to the ID that applies for you

Hope this helps