@@ 9,6 9,7 @@ from django.forms import BaseForm
from django.template.defaultfilters import striptags
from django.utils.http import urlquote
from django.utils.safestring import mark_safe
+
from wiki import models
from wiki.conf import settings
from wiki.core.plugins import registry as plugin_registry
@@ 213,3 214,9 @@ def wiki_settings(name):
@register.filter
def starts_with(value, arg):
return value.startswith(arg)
+
+@register.simple_tag
+def get_article_tree(node):
+ if not node.is_root_node():
+ node = node.get_root()
+ return node.get_children()