Use object.url to get the url for author, category and tags

This commit is contained in:
Kyle Fuller
2012-05-14 18:17:00 +01:00
parent 2e0d1cae62
commit 9c349d82c6
42 changed files with 74 additions and 74 deletions

View File

@@ -1,5 +1,5 @@
<details class="meta">
Publié le <time datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time>
{% if article.author %} par {{ article.author }}{% endif %} dans «<a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>».
{% if article.tags %}Mots-clés: {% for tag in article.tags %}{%if loop.index > 1%}, {%endif%}<a href="{{ SITEURL }}/tag/{{ tag }}.html">{{ tag }}</a>{% endfor %}</p>{% endif %}
{% if article.author %} par {{ article.author }}{% endif %} dans «<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>».
{% if article.tags %}Mots-clés: {% for tag in article.tags %}{%if loop.index > 1%}, {%endif%}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}</p>{% endif %}
</details>

View File

@@ -6,7 +6,7 @@
<h2>Catégories</h2>
<ul>
{% for cat, null in categories %}
<li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a></li>
<li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
</ul>
</div>
@@ -16,7 +16,7 @@
<h2>Mots-clés:</h2>
<ul>
{% for tag in article.tags %}
<li><a href="{{SITEURL}}/tag/{{tag}}.html">{{ tag }}</a></li>
<li><a href="{{SITEURL}}/{{tag.url}}">{{ tag }}</a></li>
{% endfor %}
<li><a class="more" href="{{SITEURL}}/tags.html">Plus...</a></li>
</ul>

View File

@@ -6,7 +6,7 @@
<h2 class="page_title">Liste des mots-clés</h2>
<ul id="tag_list">
{% for tag, articles in tags %}
<li><h3><a href="{{SITEURL}}/tag/{{tag}}.html">{{ tag }}</a></h3></li>
<li><h3><a href="{{SITEURL}}/{{tag.url}}">{{ tag }}</a></h3></li>
{% endfor %}
</ul>
{% endblock %}