It looks like you're new here. If you want to get involved, click one of these buttons!
<?php
$primaryMenu = fuel_nav(array('group_id' => 'Primary', 'depth' => 1, 'active' => uri_path(), 'cascade_selected' => FALSE, 'return_normalized' => TRUE));
echo $this->menu->render($primaryMenu, 'active', NULL, 'basic');
?>
Comments
'styles' => array(2 => 'has-dropdown');
You can also do nested menu items by nesting an array:
'styles' => array(2 => array(0 => 'has-dropdown'));
$primaryMenu = fuel_nav(array('group_id' => 'Primary', 'depth' => 1, 'styles' => array(0 => 'has-dropdown'), 'active' => uri_path(), 'cascade_selected' => FALSE, 'return_normalized' => TRUE));
it gives every menu item the 'has-dropdown' class on its < li > tag (or if I changed to 'styles' => array(1 => 'has-dropdown') it appeared to give everything that was a child the has-dropdown class).
Secondly, for the child nav items I need the class to be on the < ul > not individual < li > tags.
$primaryMenu = fuel_nav(array('group_id' => 'Primary', 'depth' => 1, 'styles' => array(0 => array(4 => 'has-dropdown')), 'active' => uri_path(), 'cascade_selected' => FALSE, 'return_normalized' => TRUE));
But my question about the class on its < ul > child still stands.
Thanks!
For easy future reference this is what we have for 2 specific nav items with second level navgiation dropdowns. Any that do have a dropdown also have the dropdown class on the sub-container:
$primaryMenu = fuel_nav(array('group_id' => 'Primary', 'depth' => 1, 'styles' => array(0 => array(4 => 'has-dropdown', 1 => 'has-dropdown')), 'subcontainer_tag_class' => array(0 => 'dropdown'), 'active' => uri_path(), 'cascade_selected' => FALSE, 'return_normalized' => TRUE));