Skip to content

Instantly share code, notes, and snippets.

@gcavalcante8808
Created June 8, 2013 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gcavalcante8808/5735435 to your computer and use it in GitHub Desktop.
Save gcavalcante8808/5735435 to your computer and use it in GitHub Desktop.
IronWiki - Template - ListView --> Article
{% extends "index.html" %}
{% load mptt_tags %}
{% load i18n %}
{% block wiki_breadcrumbs %}
{% recursetree nodes %}
{% if node.get_ancestors %}
{% for item in node.get_ancestors %}
<a href="{% url 'get' item.id %}">{{ item }}</a>
<span class="divider">/</span>
{% endfor %}
{% else %}
<a href="{% url 'get' node.id %}">{{ node }}</a>
{% endif %}
{% endrecursetree %}
{% endblock wiki_breadcrumbs %}
{% block child_list %}
{% recursetree nodes %}
ANCEST:{{ node.get_ancestors }}<br />
CHILDREN:{{ node.get_children }}<br />
DESCEND:{{ node.get_descendants }}<br />
LEAFS:{{ node.get_leafnodes }}<br />
LEVEL:{{ node.get_level }}<br />
NEXT_BY_CREATED:{{ node.get_next_by_created }}<br />
ROOT:{{ node.get_root }}<br />
SIBLINGS:{{ node.get_siblings }}
{% if not node.is_leaf_node %}
{# {% for item in node.get_children %}#}
{# <li>#}
{# <a href="{% url 'get' item.id %}">{{ item }}</a>#}
{# </li>#}
{# <li class="divider"></li>#}
{# {% endfor %}#}
{% else %}
<li>
"This Article Don't Have Child Articles"
</li>
{% endif %}
{% endrecursetree %}
{% endblock child_list %}
{% block content %}
<div class="container">
<div id="epiceditor" class="epiceditors"></div>
{% if article_list %}
{% for article in article_list %}
<div>
{{ article }}
{{ article.current_revision.content }}
</div>
{% endfor %}
{% endif %}
</div>
{% endblock content %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment