Browse Source

Sort translations list in alphabetical order

Talha Mansoor 11 years ago
parent
commit
206f162590
1 changed files with 1 additions and 1 deletions
  1. 1 1
      templates/_includes/translations.html

+ 1 - 1
templates/_includes/translations.html

@@ -2,7 +2,7 @@
 {% if article.translations %}
 {% if article.translations %}
 <p id="list-of-translations">
 <p id="list-of-translations">
 This post is also available in:
 This post is also available in:
-    {% for translation in article.translations %}
+    {% for translation in article.translations|sort(attribute = 'lang') %}
     <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>{% if loop.index0 + 2 == loop.length %} and{% elif not loop.last %}, {% endif %}
     <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>{% if loop.index0 + 2 == loop.length %} and{% elif not loop.last %}, {% endif %}
     {% endfor %}
     {% endfor %}
 </p>
 </p>