From 0ee0d96e0fc30b188a2b4ce292b0b9606b48e78d Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 26 Aug 2017 02:56:05 +0530 Subject: [PATCH 1/7] Added default text plugin for the cms page title --- dynamicweb/settings/base.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 08ce457d..4950da5e 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -317,6 +317,15 @@ CMS_PLACEHOLDER_CONF = { }, ] }, + 'datacenterlight_cms_page_title': { + 'name': _('Data Center Light Title Text'), + 'default_plugins': [ + { + 'plugin_type': 'TextPlugin', + 'values': {'body': '

'}, + }, + ] + }, } CACHES = { From 0be3266ed36324eefc87cc7dbc7e3f2b2d13254a Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 26 Aug 2017 20:46:51 +0530 Subject: [PATCH 2/7] Moved cms toolbar before title tag --- datacenterlight/templates/datacenterlight/base.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index 671d894e..18ce14eb 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -10,9 +10,10 @@ - - Data Center Light - - {% block title %}VM hosting made in Switzerland{% endblock %} + {% cms_toolbar %} + + {% block title %}{% page_attribute page_title %}{% endblock %} + @@ -41,7 +42,6 @@ - {% cms_toolbar %} {% include "datacenterlight/includes/_navbar.html" %} From af713a0e965ea46a28fb44ba818ffad825cc9631 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 26 Aug 2017 20:49:17 +0530 Subject: [PATCH 3/7] cms_page.html: Added placeholder for title tag --- datacenterlight/templates/datacenterlight/cms_page.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datacenterlight/templates/datacenterlight/cms_page.html b/datacenterlight/templates/datacenterlight/cms_page.html index f42528e4..7b43c02b 100644 --- a/datacenterlight/templates/datacenterlight/cms_page.html +++ b/datacenterlight/templates/datacenterlight/cms_page.html @@ -1,10 +1,12 @@ {% extends "datacenterlight/base.html" %} {% load staticfiles cms_tags sekizai_tags %} +{% block title %} +{% placeholder 'datacenterlight_cms_page_title_tag' %} +{% endblock %} {% block content %} {% addtoblock "css" %} {% endaddtoblock %} -
From 67880d5d60789ed201cec0f9cd761fcb5ed52b01 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 26 Aug 2017 20:52:47 +0530 Subject: [PATCH 4/7] Added configuration for datacenterlight_cms_page_title_tag --- dynamicweb/settings/base.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 4950da5e..f6839783 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -317,12 +317,21 @@ CMS_PLACEHOLDER_CONF = { }, ] }, + 'datacenterlight_cms_page_title_tag': { + 'name': _('Data Center Light Title Tag Text'), + 'default_plugins': [ + { + 'plugin_type': 'TextPlugin', + 'values': {'body': ''}, + }, + ] + }, 'datacenterlight_cms_page_title': { 'name': _('Data Center Light Title Text'), 'default_plugins': [ { 'plugin_type': 'TextPlugin', - 'values': {'body': '

'}, + 'values': {'body': ''}, }, ] }, From 6c1307d1d389e0dfbc40dac874ecd1f1dcd24e15 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 26 Aug 2017 21:01:21 +0530 Subject: [PATCH 5/7] Reverted back to original title in base.html --- datacenterlight/templates/datacenterlight/base.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index 18ce14eb..45b30cad 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -11,9 +11,8 @@ {% cms_toolbar %} - - {% block title %}{% page_attribute page_title %}{% endblock %} - + Data Center Light - + {% block title %}VM hosting made in Switzerland{% endblock %} From 51190a5546aa4cda999c29b2bfc7c493640ff481 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 31 Aug 2017 00:36:19 +0530 Subject: [PATCH 6/7] Added page_title in the title tag and the page title text --- datacenterlight/templates/datacenterlight/cms_page.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/cms_page.html b/datacenterlight/templates/datacenterlight/cms_page.html index 7b43c02b..3e3b038a 100644 --- a/datacenterlight/templates/datacenterlight/cms_page.html +++ b/datacenterlight/templates/datacenterlight/cms_page.html @@ -1,7 +1,7 @@ {% extends "datacenterlight/base.html" %} {% load staticfiles cms_tags sekizai_tags %} {% block title %} -{% placeholder 'datacenterlight_cms_page_title_tag' %} +{% page_attribute page_title %} {% endblock %} {% block content %} {% addtoblock "css" %} @@ -13,7 +13,7 @@
-

{% placeholder 'datacenterlight_cms_page_title' %}

+

{% page_attribute page_title %}

From b3b2ca7193c436ef5d672fb71e124b27eb59ffba Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 31 Aug 2017 00:39:36 +0530 Subject: [PATCH 7/7] Removed unused placeholder configuration --- dynamicweb/settings/base.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index f6839783..08ce457d 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -317,24 +317,6 @@ CMS_PLACEHOLDER_CONF = { }, ] }, - 'datacenterlight_cms_page_title_tag': { - 'name': _('Data Center Light Title Tag Text'), - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': {'body': ''}, - }, - ] - }, - 'datacenterlight_cms_page_title': { - 'name': _('Data Center Light Title Text'), - 'default_plugins': [ - { - 'plugin_type': 'TextPlugin', - 'values': {'body': ''}, - }, - ] - }, } CACHES = {