]> git.parisson.com Git - mezzo.git/commitdiff
add related posts
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 22 Apr 2016 09:00:14 +0000 (11:00 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 22 Apr 2016 09:00:14 +0000 (11:00 +0200)
app/templates/pages/richtextpage.html

index da9457d89a147e77353ad7acc81e6c63df194b9b..51ed3dc5a3a857a304bf5cfc1ed26bbab902bf91 100644 (file)
@@ -8,9 +8,12 @@
 {{ page.richtextpage.content|richtext_filters|safe }}
 {% endeditable %}
 
-{% block related_events %}
-<hr style="margin-top: 3rem;">
+{% block related_objects %}
+
 {% if page.featured.all %}
+<hr style="margin-top: 3rem;">
+
+{% if page.featured.all.0.events.all %}
 <h2 class="section__title">{% trans "Related events" %}</h2> <br>
 <div class="msry__container">
  <div class="msry__sizer"></div>
   {% endfor %}
 </div>
 {% endif %}
-{% endblock %}
 
+{% if page.featured.all.0.blogposts.all %}
+<h2 class="section__title">{% trans "Related posts" %}</h2> <br>
+<div class="msry__container">
+ <div class="msry__sizer"></div>
+  {% for post in page.featured.all.0.blogposts.all %}
+   {% include 'blog/includes/post_card.html' %}
+  {% endfor %}
+</div>
+{% endif %}
 
+{% endif %}
+{% endblock %}
 {% endblock %}