From: Jérémy Fabre Date: Wed, 27 Jul 2016 14:20:51 +0000 (+0200) Subject: Move the descendant pages in the page_content block X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=9ec060e3bb4d779634fa5006df4f8fe674a6e058;p=mezzo.git Move the descendant pages in the page_content block --- diff --git a/app/templates/pages/basicpage.html b/app/templates/pages/basicpage.html index 19735373..82150088 100644 --- a/app/templates/pages/basicpage.html +++ b/app/templates/pages/basicpage.html @@ -41,6 +41,17 @@ {{ page.basicpage.content|richtext_filters|safe }} {% endeditable %} + {% if page.get_ascendants|length == 1 %} + {% children_pages page.id as childrens %} + {% if childrens %} + {% for children in childrens %} + {% with children as object %} + {% include "pages/includes/page_card.html" %} + {% endwith %} + {% endfor %} + {% endif %} + {% endif %} + {% comment %} Add the slider here {% endcomment %} @@ -50,23 +61,6 @@ {% block main %} {{ block.super }} - {% if page.get_ascendants|length == 1 %} - {% children_pages page.id as childrens %} - {% if childrens %} -
-
- {% for children in childrens %} -
- {% with children as object %} - {% include "pages/includes/page_card.html" %} - {% endwith %} -
- {% endfor %} -
-
- {% endif %} - {% endif %} - {% if page.basicpage.pageblock_set.all %}
diff --git a/app/templates/pages/department.html b/app/templates/pages/department.html index 96e310e8..570ca61d 100644 --- a/app/templates/pages/department.html +++ b/app/templates/pages/department.html @@ -45,6 +45,17 @@ {{ page.department.content|richtext_filters|safe }} {% endeditable %} + {% if page.get_ascendants|length == 1 %} + {% children_pages page.id as childrens %} + {% if childrens %} + {% for children in childrens %} + {% with children as object %} + {% include "pages/includes/page_card.html" %} + {% endwith %} + {% endfor %} + {% endif %} + {% endif %} + {% comment %} Add the slider here {% endcomment %} diff --git a/app/templates/pages/team.html b/app/templates/pages/team.html index f0f331ee..d7bf846d 100644 --- a/app/templates/pages/team.html +++ b/app/templates/pages/team.html @@ -41,6 +41,17 @@ {{ page.team.content|richtext_filters|safe }} {% endeditable %} + {% if page.get_ascendants|length == 1 %} + {% children_pages page.id as childrens %} + {% if childrens %} + {% for children in childrens %} + {% with children as object %} + {% include "pages/includes/page_card.html" %} + {% endwith %} + {% endfor %} + {% endif %} + {% endif %} + {% comment %} Add the slider here {% endcomment %}