bootstrap\Dropdown $items

$items public property

List of menu items in the dropdown. Each array element can be either an HTML string, or an array representing a single menu with the following structure:

  • label: string, required, the label of the item link.
  • encode: boolean, optional, whether to HTML-ecnode item label.
  • url: string|array, optional, the url of the item link. This will be processed by \yii\bootstrap\Url::to(). If not set, the item will be treated as a menu header when the item has no sub-menu.
  • visible: boolean, optional, whether this menu item is visible. Defaults to true.
  • linkOptions: array, optional, the HTML attributes of the item link.
  • options: array, optional, the HTML attributes of the item.
  • items: array, optional, the submenu items. The structure is the same as this property. Note that Bootstrap doesn't support dropdown submenu. You have to add your own CSS styles to support it.
  • submenuOptions: array, optional, the HTML attributes for sub-menu container tag. If specified it will be merged with $submenuOptions.

To insert divider use <li role="presentation" class="divider"></li>.

public array $items = []
doc_Yii
2016-10-30 16:53:19
Comments
Leave a Comment

Please login to continue.