Create a Category class which has a url property

This commit is contained in:
Kyle Fuller 2011-12-22 15:13:12 +00:00
commit 6754099730
6 changed files with 27 additions and 5 deletions

View file

@ -8,7 +8,7 @@
By <a class="url fn" href="{{ SITEURL }}/author/{{ article.author }}.html">{{ article.author }}</a>
</address>
{% endif %}
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
<p>In <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
{% include 'taglist.html' %}
{% include 'translations.html' %}
</footer><!-- /.post-info -->

View file

@ -2,7 +2,7 @@
{% block content %}
<ul>
{% for category, articles in categories %}
<li>{{ category }}</li>
<li><a href="{{ category.url }}">{{ category }}</a></li>
{% endfor %}
</ul>
{% endblock %}