Commit a7bbf186 by tschmidt-dev

added Django 1.5 url syntax to macros plugin; added condition to avoid…

added Django 1.5 url syntax to macros plugin; added condition to avoid generating empty lists for each child in article_list macro
parent 5eda8788
{% load wiki_macro_tags %} {% load wiki_macro_tags %}
{% if article_children %} {% if article_children %}
<div class="well wiki-article-list"> <div class="well wiki-article-list">
<h3>Articles</h3> <h3>Articles</h3>
......
{% load wiki_macro_tags %} {% load wiki_macro_tags %}
<p><a href="{% url wiki:get path=urlpath.path %}">{{ urlpath.article }}</a></p> {% load url from future %}
<div class="wiki-article-sublist">
<ul> <p><a href="{% url 'wiki:get' path=urlpath.path %}">{{ urlpath.article }}</a></p>
<li> {% if urlpath.children.count %}
{% for urlpath in urlpath.children.all %} <div class="wiki-article-sublist">
{% article_list urlpath %} <ul>
{% endfor %} <li>
</li> {% for urlpath in urlpath.children.all %}
</ul> {% article_list urlpath %}
</div> {% endfor %}
</li>
</ul>
</div>
{% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment