# HG changeset patch # User Goffi # Date 1529535753 -7200 # Node ID da2c0dc7c1ff02cf16cc79811e13faa171e9ae25 # Parent 0ec76c1f53d3ab477f74342fd57fabc6c3c996ef blog/articles: work around for titles diff -r 0ec76c1f53d3 -r da2c0dc7c1ff sat_templates/default/blog/articles.html --- 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 -%}