Actions

API16

JHtmlMenu/menuitemlist

From Joomla! Documentation

< API16:JHtmlMenu
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Displays an HTML select list of menu items.

[<! removed edit link to red link >]

<! 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 edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />