From: Guillaume Pellerin Date: Fri, 22 Apr 2016 09:00:14 +0000 (+0200) Subject: add related posts X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0deabfea23a1252544baa0072315e40268e92246;p=mezzo.git add related posts --- diff --git a/app/templates/pages/richtextpage.html b/app/templates/pages/richtextpage.html index da9457d8..51ed3dc5 100644 --- a/app/templates/pages/richtextpage.html +++ b/app/templates/pages/richtextpage.html @@ -8,9 +8,12 @@ {{ page.richtextpage.content|richtext_filters|safe }} {% endeditable %} -{% block related_events %} -
+{% block related_objects %} + {% if page.featured.all %} +
+ +{% if page.featured.all.0.events.all %}

{% trans "Related events" %}


@@ -19,7 +22,17 @@ {% endfor %}
{% endif %} -{% endblock %} +{% if page.featured.all.0.blogposts.all %} +

{% trans "Related posts" %}


+
+
+ {% for post in page.featured.all.0.blogposts.all %} + {% include 'blog/includes/post_card.html' %} + {% endfor %} +
+{% endif %} +{% endif %} +{% endblock %} {% endblock %}