delimited fuel_nav does not display active class

edited July 2012 in News & Announcements
Hi,

I am trying to create a menu in my footer view that should look like this:
Home - Events - Gallery - Tourism Forum - Contact Us - Sitemap

I call it like this:
echo fuel_nav(array('file'=>'footermenu','container_tag_id' => 'footermenu', 'render_type'=>'delimited', 'active_class'=>'active', 'delimiter'=>' - '));

The active class is not being added to the menu item:
url: localhost/clarenssa/home The html: <div id="footermenu"> <a href="http://localhost/clarenssa/home" title="Home">Home</a>&nbsp;-&nbsp;<a href="http://localhost/clarenssa/events" title="Events">Events</a>&nbsp;-&nbsp;<a href="http://localhost/clarenssa/gallery" title="Gallery">Gallery</a>&nbsp;-&nbsp;<a href="http://localhost/clarenssa/clarenstourismforum" title="Tourism Forum">Tourism Forum</a>&nbsp;-&nbsp;<a href="http://localhost/clarenssa/contact" title="Contact Us">Contact Us</a>&nbsp;-&nbsp;<a href="http://localhost/clarenssa/sitemap" title="Sitemap">Sitemap</a></div>

I am getting this message in the console:
"CSS Usage: initializing extensions"

Any idea what's wrong?

Comments

  • edited July 2012
    You have these links created in the 'Navigation' and they are published?

    I just did a quick test and this:

    <?=fuel_nav(array('render_type' => 'delimited'))?>

    for url http://localhost/test_project/home, outputs:

    <a href="http://localhost/test_project/home" class="active">Home</a> &nbsp;|&nbsp; <a href="http://localhost/test_project/one">One</a> &nbsp;|&nbsp; <a href="http://localhost/test_project/two">Two</a> &nbsp;|&nbsp; <a href="http://localhost/test_project/three">Three</a>

    To test, can you scale your usage back to that and see if you get what I do?
  • edited 12:29PM
    This was actually something that was fixed in the 1.0 beta version:
    https://github.com/daylightstudio/FUEL-CMS/tree/1.0

    The fix I believe is to replace line 738 of the fuel/modules/fuel/libraries/Menu.php file with the following:
    $links[] = $this->_create_link($val, $val['id']);
  • edited 12:29PM
    Lance, my menu is create with a file, not through the cms.

    So I can't call my menu like you do I need to give it all the parameters that I am giving it.

    admin, there is no Menu.php file under: fuel/modules/fuel/libraries

    There is one under fule/application/libraries and in this file on line: 691 there is this code: $links[] = $this->_create_link($val); which I changed to your code: $links[] = $this->_create_link($val, $val['id']); but that didn't help.
  • edited 12:29PM
    Sorry... the fuel/modules/fuel/libraries is the new path in the 1.0 beta. Does it work if you replace the entire Menu class with the Menu class from the 1.0 beta:
    https://github.com/daylightstudio/FUEL-CMS/blob/1.0/fuel/modules/fuel/libraries/Menu.php
Sign In or Register to comment.