API16:JHtmlMenu/menuitemlist
From Joomla! Documentation
Description
Displays an HTML select list of menu items.
<! removed transcluded page call, red link never existed >
Syntax
static menuitemlist($name, $selected=null, $attribs=null, $config=array())
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | The name of the control. | |
| $selected | null | The value of the selected option. |
| $attribs | null | Attributes for the control. |
| $config | array() | An array of options for the control. |
Returns
string
Defined in
libraries/joomla/html/html/menu.php
Importing
jimport( 'joomla.html.html.menu' );
Source Body
public static function menuitemlist($name, $selected = null, $attribs = null, $config = array())
{
static $count;
$options = self::menuitems($config);
return JHtml::_(
'select.genericlist',
$options,
$name,
array(
'id' => isset($config['id']) ? $config['id'] : 'assetgroups_'.++$count,
'list.attr' => (is_null($attribs) ? 'class="inputbox" size="1"' : $attribs),
'list.select' => (int) $selected,
'list.translate' => false
)
);
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples