fuel_nav styles not adding to all li elements

edited November 2013 in Bug Reports
I have added navigation using the navigation module in admin. I can display the menu ok, but the styles I am trying to add are only being added to the first few list items. The code I am using is:

$nav_styles = array(); $nav_styles[0] = 'test'; echo fuel_nav( array( 'group_id' => 'main', 'styles' => $nav_styles ) );

This results in a list like this in the source code:

<ul> <li class="first test"><a href="//localhost/home" title="Home">Home</a></li> <li class="test"><a href="//localhost/products" title="Products">Products</a></li> <li class="test"><a href="//localhost/support" title="Support">Support</a></li> <li class="test"><a href="//localhost/shipping" title="Shipping">Shipping</a></li> <li><a href="//localhost/about" title="About">About</a></li> <li class="last"><a href="//localhost/contact" title="Contact">Contact</a></li> </ul>

If I change the order of the menu items in admin, it still only adds 'test' as a class to the first four. If I change the class to 'nav' instead of 'test' then it only applies the style to the first three for some reason. I tried outputting the menu as an array to see if there was something odd behind the scenes in the menu, but all the items looked pretty much the same. Is this something stupid I am doing?

Comments

  • edited 3:15AM
    Is this version 0.93 or 1.0 beta?
  • edited 3:15AM
    This is in 0.93
  • edited 3:15AM
    I believe that issue is fixed in the 1.0 beta. You could try upgrading to the 1.0 beta or simply try replacing the Menu class:
    https://github.com/daylightstudio/FUEL-CMS/blob/1.0/fuel/modules/fuel/libraries/Menu.php

    1.0 documentation:
    http://docs.getfuelcms.com/general/navigation
  • edited 3:15AM
    Thanks for your help :-) I tried 1.0 beta but went back to 0.93 as it didn't have all the features I need. I will update the menu class.
  • edited 3:15AM
    I'm curious as to what features you were needing?
  • edited 3:15AM
    I was wanting a full wysiwyg editor in the back end for clients to be able to update their content. There only seemed the option to update inline which I didn't like. Using a backend seems easier to teach clients use. I don't know fuel cms well enough yet to be able to quickly put my own editor in. Because I am just working out how the system works, I also felt I needed more documentation - I wasn't sure what applied to 1.0 and what was 0.93 only. Will give it another go when it is out of beta and I have more experience :-)
  • edited 3:15AM
    The default editor is markitup, but in the MY_fuel config file you can specify CK Editor which comes shipped with Fuel.
Sign In or Register to comment.