def recursenavigation(parser, token):
"""
Based on django-mptt's recursetree templatetag. In addition to {{ item }} and {{ children }},
- sets {{ active }} and {{ active_descendants }} in the context.
+ sets {{ active }}, {{ active_descendants }}, {{ navloop.counter }}, {{ navloop.counter0 }},
+ {{ navloop.revcounter }}, {{ navloop.revcounter0 }}, {{ navloop.first }}, {{ navloop.last }},
+ and {{ navloop.parentloop }} in the context.
- Note that the tag takes one variable, which is a Node instance.
+ Note that the tag takes two variables: a Node instance and the key of the navigation to
+ be recursed.
Usage:
<ul>