1 from django import template
2 from django.conf import settings
3 from philo.contrib.navigation.models import Navigation
6 register = template.Library()
10 def get_navigation(node):
11 return Navigation.objects.closest_navigation(node)
14 def is_active(navigation, request):
16 Returns true if the navigation is considered `active`.
18 But what does "active" mean? Should this be defined on the model instead, perhaps?
21 if navigation.target_node == request.node:
22 if request.path == navigation.target_url:
25 if navigation.target_url in request.path: