Using fuel_nav() with Bootstrap
Hi
I've been playing with fuel_nav() to display a Fuel navigation group as a set of Bootstrap buttons - with some difficulty.
I think, in the same way that fuel_nav() has options for container_tag_attrs, it would be really useful to have an item_attrs option too.
Additionally, there's an issue with using item_tag='button' in that the resulting HTML puts the <a> anchor inside the <button> - which renders it unclickable.
<button class="btn"><a href="link">test</a></button>
By setting item_tag='', I can get a list of <a> anchors - which is fine but I need to be able to set the anchor class="btn" and role="button" for Bootstrap compatibility. Currently, I'm doing this via javascript once the page is loaded - it's a bit messy.
<a href="link" class="btn" role="button">test</a>
It would, therefore, be handy to have the item_attrs option as a generally useful thing but also to allow all the item specific options to cascade down into the anchors if item_tag=''.
Hope that makes sense...
Comments
$nav['mypage'] = array('label' => 'My Page', 'attributes' => 'class="btn" role="button"');