Skip to content

domenu node level #30

@gabbork

Description

@gabbork

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions