Return normalized messes up fuel_nav with parent

Just updated to the newest version of the code and this used to work and would return an array of just the pages under trustees but now it looks to be returning everything. Its fine if I leave off the return normalized but once I add that it gets messed up. Any help would be much appreciated.

$nav_params = array(); $nav_params['parent'] = 'trustees'; $nav_params['return_normalized'] = TRUE; $nav = fuel_nav($nav_params);


  • edited 11:56PM
    Ok I think I understand what the issue is here but am not sure how best to fix it. This section of code is at the end of fuel_helper.php and $p['parent'] is valid up to this point but not handled in the normalize scenario.

    if ($p['return_normalized'] !== FALSE) { return $CI->menu->normalize_items($items); } return $CI->menu->render($items, $p['active'], $p['parent']);

    Looking at the Menu class normalize_items does not take into account parent where as the render method does. The render method calls normalize_items but then calls _get_menu_items which looks to be filtering based parent_id. What would be the best way to filter results based on $p['parent'] when return_normalized is set as an option for the fuel_nav function?
  • edited 11:56PM
    Thanks for the info. I'll take a look...
  • edited 11:56PM
    Are you wanting $nav_params['parent'] to return just their immediate children or cascade down to their grandchildren? Also, would the render_type = 'array' work for what you need it for?
  • edited 11:56PM
    I wanted it to cascade. render_type = 'array' actually did the trick ... not sure why I didn't notice that before. Thanks for the insight and help!
Sign In or Register to comment.