diff default/blog/item.html @ 99:609c66552ba0

blog/item: handle new tags_http_uri variable to make tags clickable
author Goffi <goffi@goffi.org>
date Sun, 21 Jan 2018 20:25:24 +0100
parents 94b5806b9e2f
children 988a1c0e8419
line wrap: on
line diff
--- a/default/blog/item.html	Sun Jan 21 10:09:05 2018 +0100
+++ b/default/blog/item.html	Sun Jan 21 20:25:24 2018 +0100
@@ -59,9 +59,15 @@
             </div>
             {% if item.tags %}
                 <div class="labels">
-                    {% for tag in item.tags %}
-                        <span>{{tag}}</span>
-                    {% endfor %}
+                    {% if tags_http_uri is defined %}
+                        {% for tag in item.tags %}
+                            <a href="{{tags_http_uri[tag]}}"><span>{{tag}}</span></a>
+                        {% endfor %}
+                    {% else %}
+                        {% for tag in item.tags %}
+                            <span>{{tag}}</span>
+                        {% endfor %}
+                    {% endif %}
                 </div>
             {% endif %}
             {% endblock metadata %}