how to add attributed to nav bootstrap menues
Hi
I am trying to work with nav section and newly discovering it
now i want to generate an menu like following :
'
'
With the code :
<?php echo $nav_arr = fuel_nav(array('depth'=>4
,'render_type' => 'basic'
, 'group_id' => 1
,'container_tag_attrs' => array('style' => '')
,'container_tag_class' => 'nav navbar-nav menuright'
,'order' => 'precedence'
,'subcontainer_tag_class'=>array('dropdown-menu', 'styles' => array(0 => array(1 => 'dropdown')))
)); ?>
but cant getting the way to do the changes specially in this section
can one please help me out ????please view the source code of those list
Comments
it is form the CMS
$nav['home'] = array('label' => 'Home');
$nav['about-us'] = array('label' => 'about us');
$nav['product'] = array('label' => 'Product', 'location' => 'product-1', 'attributes' => 'product-1');
$nav['Product-Support'] = array('label' => 'Product Support');
$nav['Contact'] = array('label' => 'Contact');
$nav['product-1'] = array('label' => 'Product 1', 'parent_id' => 'product');
$nav['product-2'] = array('label' => 'product-2', 'parent_id' => 'product');
<?php echo $nav_arr = fuel_nav(array('depth'=>4 ,'render_type' => 'basic' , 'group_id' => 1 ,'container_tag_attrs' => array('style' => '') ,'container_tag_class' => 'nav navbar-nav menuright' ,'order' => 'precedence' ,'subcontainer_tag_class'=>array('dropdown-menu', 'styles' => array(0 => array(1 => 'dropdown'))) ,'styles'=> array(0 => array(2 => 'dropdown')) )); ?>
Also, I updated the nav to fix attributes on the item as well as the label to include the with:
$nav['home'] = array('label' => 'Home'); $nav['about-us'] = array('label' => 'about us'); $nav['product'] = array('label' => 'Product <span class="caret"></span>', 'location' => 'product-1', 'attributes' => 'class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"',); $nav['Product-Support'] = array('label' => 'Product Support'); $nav['Contact'] = array('label' => 'Contact'); $nav['product-1'] = array('label' => 'Product 1', 'parent_id' => 'product'); $nav['product-2'] = array('label' => 'product-2', 'parent_id' => 'product');
There was no response for this fix, It will always be better to give feedback so as to know if a particular hack fixed an issue or not.