Posts by category
ADD "module.blog" as a field in custom module
<h2>Posts by category</h2>
{% set topics_list = blog_topics(module.blog, 250) %}
{% if topics_list %}
<ul>
{% for topic in topics_list %}
<li><strong>Category: </strong> <a href="{{ blog_tag_url(module.blog, topic.slug) }}">{{ topic.name }}</a></li>
{% set topic_posts = blog_recent_topic_posts( module.blog , topic.slug , 10) %}
{% for topic_post in topic_posts %}
{% if topic_post.absolute_url != request.full_url %}
<div class="post-title"><a href="{{topic_post.absolute_url}}">{{ topic_post.name }}</a></div>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
{% endif %}
Comments
Post a Comment