Need a Demonstration for the 'styles' parameter for the fuel_nav function
Hello, can someone demonstrate how to use the 'styles' parameter showcased here?
http://www.getfuelcms.com/user_guide/libraries/menuIt says "CSS class styles to apply to menu items... can be a nested array". My problem is how should this array be formatted? I have tried these two options (see below) and neither work, so I just need someone who knows how this works to give me a working example. Thanks!
<?=fuel_nav(array('group_id' => 'Secondary', 'styles' => 'margin-0')); ?>
<?=fuel_nav(array('group_id' => 'Secondary', 'styles' => array('li' => 'margin-0') )); ?>
Comments
$css_classes = array(); $css_classes[0] = 'test'; // will apply class="test" to all li elements on the first level $css_classes[0] = array(1 => 'test'); // will apply class="test" to the 2nd li element on the first level $css_classes[1][1] = 'test2'; // will apply the class="test2" to the 2nd element (index 1), of the 2nd level (index 1). fuel_nav(array('styles' => $css_classes));