bootstrap\Nav $items

$items public property

List of items in the nav widget. Each array element represents a single menu item which can be either a string or an array with the following structure:

  • label: string, required, the nav item label.
  • url: optional, the item's URL. Defaults to "#".
  • visible: boolean, optional, whether this menu item is visible. Defaults to true.
  • linkOptions: array, optional, the HTML attributes of the item's link.
  • options: array, optional, the HTML attributes of the item container (LI).
  • active: boolean, optional, whether the item should be on active state or not.
  • dropDownOptions: array, optional, the HTML options that will passed to the yii\bootstrap\Dropdown widget.
  • items: array|string, optional, the configuration array for creating a yii\bootstrap\Dropdown widget, or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus.
  • encode: boolean, optional, whether the label will be HTML-encoded. If set, supersedes the $encodeLabels option for only this item.

If a menu item is a string, it will be rendered directly without HTML encoding.

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

Please login to continue.