Commit 05264329 by niskac

committing everything.

parent c5ff3f5f
...@@ -31,13 +31,17 @@ class BootNav extends BootWidget ...@@ -31,13 +31,17 @@ class BootNav extends BootWidget
*/ */
public $brandOptions = array(); public $brandOptions = array();
/** /**
* @var string the item template.
*/
public $itemTemplate = '{menu}';
/**
* @var array the primary menu items. * @var array the primary menu items.
*/ */
public $primaryItems = array(); public $primaryItems = array();
/** /**
* @var array the secondary menu items. * @var array the secondary menu items.
*/ */
public $secondaryItems = array(); public $secondaryItems = array();
/** /**
* @var array the HTML attributes for the primary menu. * @var array the HTML attributes for the primary menu.
*/ */
...@@ -86,9 +90,9 @@ class BootNav extends BootWidget ...@@ -86,9 +90,9 @@ class BootNav extends BootWidget
$this->primaryOptions['class'] = 'nav'; $this->primaryOptions['class'] = 'nav';
if (isset($this->secondaryOptions['class'])) if (isset($this->secondaryOptions['class']))
$this->secondaryOptions['class'] .= ' secondary-nav'; $this->secondaryOptions['class'] .= ' nav secondary-nav';
else else
$this->secondaryOptions['class'] = 'secondary-nav'; $this->secondaryOptions['class'] = 'nav secondary-nav';
$cssClass = $this->type === 'normal' ? 'container' : 'container-fluid'; $cssClass = $this->type === 'normal' ? 'container' : 'container-fluid';
...@@ -101,6 +105,8 @@ class BootNav extends BootWidget ...@@ -101,6 +105,8 @@ class BootNav extends BootWidget
$this->controller->widget('bootstrap.widgets.BootMenu', array( $this->controller->widget('bootstrap.widgets.BootMenu', array(
'type'=>'', 'type'=>'',
'items'=>$this->primaryItems, 'items'=>$this->primaryItems,
'itemTemplate'=>$this->itemTemplate,
'encodeLabel'=>false,
'htmlOptions'=>$this->primaryOptions, 'htmlOptions'=>$this->primaryOptions,
)); ));
} }
...@@ -110,6 +116,8 @@ class BootNav extends BootWidget ...@@ -110,6 +116,8 @@ class BootNav extends BootWidget
$this->controller->widget('bootstrap.widgets.BootMenu', array( $this->controller->widget('bootstrap.widgets.BootMenu', array(
'type'=>'', 'type'=>'',
'items'=>$this->secondaryItems, 'items'=>$this->secondaryItems,
'itemTemplate'=>$this->itemTemplate,
'encodeLabel'=>false,
'htmlOptions'=>$this->secondaryOptions, 'htmlOptions'=>$this->secondaryOptions,
)); ));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment