[SOLVED] Menu Class render_breadcrumb function not rendering beyond root level

edited September 2012 in Bug Reports
I am having a problem with the Menu class render functions.

Basic rendering is working perfectly, but breadcrumb rending is failing.

Given the following datastructure for my navigation: (NB, taken from a print_r dump, ignore syntax, given as an example of the structure)

$menu = array( [home] => Home [plan] => Plan Details [savings] => Build Savings [savings/<subcategory>] => Array ( [label] => Make the Most of the 401(k) [parent_id] => savings [location] => savings ) [savings/<subcategory>/<individual_page>] => Array ( [label] => Contribution Calculator [location] => /tools/<page_name> [parent_id] => savings/<subcategory> ) [savings/<subcategory>/<individual_page2>] => Array ( [label] => Take Home Pay Calculator [location] => /tools/<page_name> [parent_id] => savings/<subcategory> ) [spend] => Spend Wisely [spend/<subcategory>] => Array ( [label] => Save Money on the Things You Need [parent_id] => spend [location] => spend ) [spend/<subcategory>/<individual_page>] => Array ( [label] => Flexible Spending Account Tax Savings Calculator [location] => /tools/<page_name> [parent_id] => spend/<subcategory> ) )


the following code:
echo $this->menu->render($menu, NULL, NULL, 'basic');

Will render the standard nested UL as expected.

but

$this->menu->active = '/savings/<subcategory>'; $this->menu->depth = 3; echo $this->menu->render_breadcrumb($menu); or echo $this->menu->render($menu,NULL, NULL,'breadcrumb'); <ul> <li><a href="<location>">Home</a></li> </ul>

I would expect to get:
<ul> <li><a href="http://lsifinancial.beta.weduhosting.com/">Home</a> <span class="arrow"> &gt; </span> </li> <li><subcategory label></li> </ul>

Comments

  • edited 2:58AM
    Ignore this, the problem is with the $this->menu->active value which has a '/' prepended.

    Wish I could delete this post.
Sign In or Register to comment.