changeset 152:da2c0dc7c1ff

blog/articles: work around for titles
author Goffi <goffi@goffi.org>
date Thu, 21 Jun 2018 01:02:33 +0200
parents 0ec76c1f53d3
children b84d20af0ed3
files sat_templates/default/blog/articles.html
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/default/blog/articles.html	Mon Jun 04 10:23:19 2018 +0200
+++ b/sat_templates/default/blog/articles.html	Thu Jun 21 01:02:33 2018 +0200
@@ -4,14 +4,16 @@
 {% import 'blog/macros.html' as blog with context %}
 {% import 'input/navigation.html' as navigation with context %}
 
-{% block title scoped -%}
-    {%- if single -%}
-        {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}}
-    {%- else -%}
-        {{C.APP_NAME}}
-        {# {{- super() -}}
-           FIXME: super() is failing if blog is embedded (i.e. base/base.html is not its direct parent)
-                  not sure what's the best way to avoid that, so just using C.APP_NAME for now #}
+{%- block title scoped -%}
+    {%- if not embedded -%}
+        {%- if single -%}
+            {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}}
+        {%- else -%}
+            {{C.APP_NAME}}
+            {# {{- super() -}}
+               FIXME: super() is failing if blog is embedded (i.e. base/base.html is not its direct parent)
+                      not sure what's the best way to avoid that, so just using C.APP_NAME for now #}
+        {%- endif -%}
     {%- endif -%}
 {%- endblock title -%}