Extract the Alias โ€‹โ€‹field for the Joomla menu item

Is there a way to get the alias field of the main menu item in Joomla 1.5 from the mod_mainmenu module? I know that you can access the menu with this code:

$menu = JSite::getMenu(); 

I need to use the "Alias" field to store the subtitle for a menu item. Is it possible to get this from the modMainMenuXMLCallback() function in mod_mainmenu? Thanks.

+6
php joomla
source share
1 answer
 $menu = JSite::getMenu(); $alias = $menu->getItem($id)->alias; // if you have id of menu $menu = JSite::getMenu(); $alias = $menu->getActive()->alias; // alias of active menu 
+12
source share

All Articles