diff --git a/apps/navigation/templates/generic_subnavigation.html b/apps/navigation/templates/generic_subnavigation.html index 46fecb22ab..eac581d5e0 100644 --- a/apps/navigation/templates/generic_subnavigation.html +++ b/apps/navigation/templates/generic_subnavigation.html @@ -4,7 +4,7 @@ {% with link.permissions as permissions %} {% check_permissions request.user permissions %} - {% check_access permissions request.user navigation_object %} + {% check_access permissions request.user object %} {% if permission or access %} {% if as_li %} diff --git a/apps/navigation/templatetags/navigation_tags.py b/apps/navigation/templatetags/navigation_tags.py index 86b625ab0c..81dd819c13 100644 --- a/apps/navigation/templatetags/navigation_tags.py +++ b/apps/navigation/templatetags/navigation_tags.py @@ -249,15 +249,14 @@ def get_object_navigation_links(parser, token): @register.inclusion_tag('generic_navigation.html', takes_context=True) def object_navigation_template(context): - # Pass the list object to the navigation template as the navigation object - return { - 'navigation_object': context['object'] if 'object' in context else None, - 'request': context['request'], + new_context = copy.copy(context) + new_context.update({ 'horizontal': True, - 'object_navigation_links': _get_object_navigation_links(context) - } - - + 'object_navigation_links': _get_object_navigation_links(context) + }) + return new_context + + @register.tag def get_multi_item_links(parser, token): tag_name, arg = token.contents.split(None, 1)