Sfoglia il codice sorgente

Articles list on tags list page should be sorted in descending order

Close #34
Talha Mansoor 11 anni fa
parent
commit
3228f68045
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      templates/tags.html

+ 2 - 2
templates/tags.html

@@ -38,10 +38,10 @@ All tags used in the {{ SITENAME|striptags }} blog.
 
 <div class="row-fluid">
     <div class="span8 offset2">
-        {% for tag, articles in tags|sort %}
+        {% for tag, articles in tags %}
         <h2 id="{{ tag|replace(' ', '-')|e }}-ref" class="tag-title">{{ tag }}</h2>
         <ul class="articles-in-tag">
-            {% for article in articles %} 
+            {% for article in articles|sort(reverse = true, attribute = 'date') %}
             <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
             {% endfor %}
         </ul>