+
+ if isinstance(instance, Node):
+ qs = Navigation.objects.closest_navigation(instance)
+ elif hasattr(instance, '__iter__'):
+ # Is this the right way to check?
+ qs = instance
+ else:
+ return settings.TEMPLATE_STRING_IF_INVALID
+
+ roots = cache_tree_children(qs)