Show featured images with recent posts in filter_panel.html

41 views
Skip to first unread message

Scott Diehl

unread,
Jun 6, 2014, 6:12:07 PM6/6/14
to mezzani...@googlegroups.com
Hello all,

Has anyone tried including featured images with the default recent posts block? If so, I'd love to see how this is done.

Something like this:

{% block blog_recent_posts %}
{% blog_recent_posts 5 as recent_posts %}
{% if recent_posts %}
<h3>{% trans "Recent Posts" %}</h3>
<ul class="list-unstyled recent-posts">
{% for recent_post in recent_posts %}
<li><img src="{{ MEDIA_URL }}{% thumbnail recent_post.featured_image 10 10 %}"><a href="{{ recent_post.get_absolute_url }}"
    >{{ recent_post.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}

sohania

unread,
Jun 7, 2014, 1:59:05 AM6/7/14
to mezzani...@googlegroups.com
Hi Scott

You need to modify the blog/includes/filter_panel.html template. also load mezzanine_tags on same template.

Scott Diehl

unread,
Jun 7, 2014, 3:16:31 PM6/7/14
to mezzani...@googlegroups.com
Thank you! Adding mezzanine_tags did the trick.


--
You received this message because you are subscribed to a topic in the Google Groups "Mezzanine Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mezzanine-users/RZmyYzhGxkY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen McDonald

unread,
Jun 8, 2014, 11:05:37 PM6/8/14
to mezzani...@googlegroups.com
This'll be the default in the next release, it's a great idea:



--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Stephen McDonald
http://jupo.org
Reply all
Reply to author
Forward
0 new messages