mirror of
https://github.com/almet/notmyidea.git
synced 2025-04-28 19:42:37 +02:00
don't display the category more than one time in a raw
This commit is contained in:
parent
72e40cd52c
commit
4eaa2a3da5
1 changed files with 5 additions and 1 deletions
|
@ -4,10 +4,14 @@
|
|||
{% if articles %}
|
||||
<section id="content" class="body">
|
||||
<ol id="posts-list" class="hfeed">
|
||||
{% set category = None %}
|
||||
{% for article in articles_page.object_list %}
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ article.title}}">
|
||||
<li><article class="hentry {{ article.category }}">
|
||||
{% if article.category.name != category %}
|
||||
<span class='category {{ article.category }}'>{{ article.category }}</span>
|
||||
{% set category = article.category.name %}
|
||||
{% endif %}
|
||||
<h1> {{ article.title }} </h1>
|
||||
</article></li>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue