Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domenu node level #30

Open
gabbork opened this issue Dec 3, 2012 · 0 comments
Open

domenu node level #30

gabbork opened this issue Dec 3, 2012 · 0 comments
Assignees
Labels

Comments

@gabbork
Copy link
Member

gabbork commented Dec 3, 2012

in upy.contrib.tree.tpl.* the node.level to calculate if applying before or after parameters counts always starting from the root, and not the relative-depth of the menu tree.

Ex:

root
|--- menu
|-------- submenu
|-------------- node

this:

menu_node = Node.objects.get(name="menu")
menu = Menu(request, menu_node, upy_context, menu_depth=3)
    vars_dict['menu'] = menu.as_ul(before_1="<div>", after_1="</div>",)

whil apply the 'before' tags correctly on submenu,
but this:

menu_node = Node.objects.get(name="submenu")
menu = Menu(request, menu_node, upy_context, menu_depth=3)
    vars_dict['menu'] = menu.as_ul(before_1="<div>", after_1="</div>",)

will not apply any 'before', because it counts always node.level <= 2

@ghost ghost assigned rafleze Dec 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants