From ee4e2ed27bcc9e2d15caf2a54ab19d26b387fe49 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 6 Oct 2016 12:04:50 +1000 Subject: [PATCH] Add site name to `` element in the project template --- CONTRIBUTORS.rst | 1 + .../project_template/project_name/templates/base.html | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 253d55e21..750aea7cc 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -173,6 +173,7 @@ Contributors * Ricky Robinett * Axel Haustant * Henk-Jan van Hasselaar +* alexfromvl Translators =========== diff --git a/wagtail/project_template/project_name/templates/base.html b/wagtail/project_template/project_name/templates/base.html index 76c7680ac..a97ff7421 100644 --- a/wagtail/project_template/project_name/templates/base.html +++ b/wagtail/project_template/project_name/templates/base.html @@ -8,7 +8,16 @@ <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <title>{% templatetag openblock %} block title %}{% templatetag openblock %} if self.seo_title %}{% templatetag openvariable %} self.seo_title {% templatetag closevariable %}{% templatetag openblock %} else %}{% templatetag openvariable %} self.title {% templatetag closevariable %}{% templatetag openblock %} endif {% templatetag closeblock %}{% templatetag openblock %} endblock {% templatetag closeblock %}{% templatetag openblock %} block title_suffix {% templatetag closeblock %}{% templatetag openblock %} endblock {% templatetag closeblock %} + + {% templatetag openblock %} block title %} + {% templatetag openblock %} if self.seo_title %}{% templatetag openvariable %} self.seo_title {% templatetag closevariable %}{% templatetag openblock %} else %}{% templatetag openvariable %} self.title {% templatetag closevariable %}{% templatetag openblock %} endif %} + {% templatetag openblock %} endblock %} + {% templatetag openblock %} block title_suffix %} + {% templatetag openblock %} with self.get_site.site_name as site_name %} + {% templatetag openblock %} if site_name %}- {% templatetag openvariable %} site_name {% templatetag closevariable %}{% templatetag openblock %} endif %} + {% templatetag openblock %} endwith %} + {% templatetag openblock %} endblock %} +