changeset 190:cda2aad3eed0

base: "links" template variable can now be used: if "links" is present in template data, it must be a list of dictionaries, the dictionaries will be used as attributes for the "<link>" elements in the header.
author Goffi <goffi@goffi.org>
date Fri, 26 Apr 2019 08:44:38 +0200
parents e5fdd7e13764
children 687658e83a2b
files sat_templates/templates/default/base/base.html
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/default/base/base.html	Thu Apr 25 19:47:55 2019 +0200
+++ b/sat_templates/templates/default/base/base.html	Fri Apr 26 08:44:38 2019 +0200
@@ -38,6 +38,12 @@
         {% endif %}
     {% endif %}
 
+    {% if links is defined %}
+        {% for link_data in links %}
+            <link{{link_data|xmlattr}}>
+        {% endfor %}
+    {% endif %}
+
     {% if xmpp_uri is defined %}
         <link rel="alternate" type="application/atom+xml" href="{{xmpp_uri}}" >
     {% endif %}