Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
show_menu_below_id doesn't work past a softroot node #1039
Any levels / nodes between the root node and a soft node work well with show_menu_below_id. However as soon as one puts an id on a softroot or a descendant node, show_menu_below_id doesn't work for me. I've just upgrade to 2.2 (to see if this was fixed) and it doesn't work. This means 2.1 2.2 do not work (for me).
I've added a monkeypatch to my own code to make it work for the time being, it's definitely a hack because show_menu_below_id may not work as expected for levels higher in the hierarchy than a softroot, as the SoftRootCutter modifier is not implemented.
menus/menu_pool.py line 153.
Almost the same problem (show_menu_below_id and softroots):
when on page 2 or below, show_menu_below_id "meta" nothing is shown.
From my point of view: i asked for a menu tree below a given/named id and in that situation, softroots should not interfere the result.
Whats happening in code?
I'm menu.py for
so add "or root_id" to the if statement to bail out of that modifier. when a root_id is given (show_menu_below_id do so)
only apply this modifier if we're pre-cut (since what we do is cut)
I did not have any sideeffects b changing that statement (so far).
EDIT: Edited by ojii to display the tree and code nicer
I found problem with this. Lets explain with example tree structure:
/home - ( id: home )
In the template I have:
When I'm in some of the main pages the "top_menu" is rendered, but when I'm in some of the pages in top menu the main menu is not rendered. I understand that when I am on page that is inside a softroot I can't see pages that is outside this softroot. For default menu this is Ok, but when I want pages bellow id I actually want theese pages.
I'm using the latest stable release (2.3.4)