]> git.parisson.com Git - mezzo.git/commitdiff
Add a page_card template for descendant pages
authorJérémy Fabre <blackmagik88@gmail.com>
Wed, 27 Jul 2016 14:17:41 +0000 (16:17 +0200)
committerJérémy Fabre <blackmagik88@gmail.com>
Wed, 27 Jul 2016 14:17:41 +0000 (16:17 +0200)
app/templates/pages/basicpage.html
app/templates/pages/department.html
app/templates/pages/includes/page_card.html [new file with mode: 0644]
app/templates/pages/team.html

index 084995c9f4efe764909088ca968d7eb8c470c0ba..19735373642b99d253e84f5a03154b8f3125870b 100644 (file)
@@ -57,7 +57,9 @@
                 <div class="row">
                     {% for children in childrens %}
                         <div class="col-sm-9 col-sm-push-3 col-lg-8 col-lg-push-2">
-                            <a href="{{ children.get_absolute_url }}" title="{{ children.title }}">{{ children.title }}</a>
+                            {% with children as object %}
+                                {% include "pages/includes/page_card.html" %}
+                            {% endwith %}
                         </div>
                     {% endfor %}
                 </div>
index 8e355154b8cd9c1666afd10851a41e040678264e..96e310e81aaf425e31837eafb8da402632145b17 100644 (file)
@@ -1,5 +1,5 @@
 {% extends "pages/basicpage.html" %}
-{% load i18n mezzanine_tags keyword_tags featured_tags pages_tags %}
+{% load i18n mezzanine_tags keyword_tags featured_tags pages_tags organization_tags %}
 
 {% block meta_title %}{{ page.meta_title }}{% endblock %}
 
@@ -61,7 +61,9 @@
                 <div class="row">
                     {% for children in childrens %}
                         <div class="col-sm-9 col-sm-push-3 col-lg-8 col-lg-push-2">
-                            <a href="{{ children.get_absolute_url }}" title="{{ children.title }}">{{ children.title }}</a>
+                            {% with children as object %}
+                                {% include "pages/includes/page_card.html" %}
+                            {% endwith %}
                         </div>
                     {% endfor %}
                 </div>
diff --git a/app/templates/pages/includes/page_card.html b/app/templates/pages/includes/page_card.html
new file mode 100644 (file)
index 0000000..6f79fef
--- /dev/null
@@ -0,0 +1,4 @@
+<a href="{{ object.get_absolute_url }}" title="{{ object.title }}">
+    {{ object.title }}
+    {{ object.basicpage.sub_title }}
+</a>
index 0298ba0be3228b29e2f6a5212f10f2dc6c1d7bd1..f0f331ee797714816db136af6ee44c65051959a3 100644 (file)
@@ -1,5 +1,5 @@
 {% extends "pages/basicpage.html" %}
-{% load i18n mezzanine_tags keyword_tags featured_tags pages_tags %}
+{% load i18n mezzanine_tags keyword_tags featured_tags pages_tags organization_tags %}
 
 {% block meta_title %}{{ page.meta_title }}{% endblock %}
 
@@ -57,7 +57,9 @@
                 <div class="row">
                     {% for children in childrens %}
                         <div class="col-sm-9 col-sm-push-3 col-lg-8 col-lg-push-2">
-                            <a href="{{ children.get_absolute_url }}" title="{{ children.title }}">{{ children.title }}</a>
+                            {% with children as object %}
+                                {% include "pages/includes/page_card.html" %}
+                            {% endwith %}
                         </div>
                     {% endfor %}
                 </div>