API16:JHtmlMenu/menus
From Joomla! Documentation
Description
Get a list of the available menus.
<! removed transcluded page call, red link never existed >
Syntax
array Cached array of the menus()
Returns
string
Defined in
libraries/joomla/html/html/menu.php
Importing
jimport( 'joomla.html.html.menu' );
Source Body
public static function menus()
{
if (empty(self::$menus))
{
$db = &JFactory::getDbo();
$db->setQuery(
'SELECT menutype As value, title As text' .
' FROM #__menu_types' .
' ORDER BY title'
);
self::$menus = $db->loadObjectList();
}
return self::$menus;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples