From ef22004c6b1992671fc75b137e4eeaf35725b10e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Tue, 14 Feb 2017 17:59:55 +0100 Subject: [PATCH] Add slider to related content dynamic template --- .../core/inc/related_content_dynamic.html | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/templates/core/inc/related_content_dynamic.html b/app/templates/core/inc/related_content_dynamic.html index 1d890c25..e226b2b4 100644 --- a/app/templates/core/inc/related_content_dynamic.html +++ b/app/templates/core/inc/related_content_dynamic.html @@ -8,17 +8,29 @@
-
-
+
+
+ {% for concrete_object in concrete_objects %} -
+ {% if forloop.counter0 == 0 or forloop.counter|divisibleby:3 %} +
+
+ {% endif %} + +
{% with app_label=concrete_object|app_label_short classname=concrete_object|classname|lower object=concrete_object %} {% with app_label|add:"/"|add:classname|add:"/includes/"|add:classname|add:"_card.html" as template %} {% include template %} {% endwith %} {% endwith %}
+ + {% if forloop.last or forloop.counter|divisibleby:2 %} +
+
+ {% endif %} {% endfor %} +
-- 2.39.5