I've made a custom module for my blog pages, which shows the most recent page containing a certain topic. I have two templates in which this custom module is shown, the blog post template and the blog template itself.
The custom module looks great in the blog post template, but it doesn't appear in the blog template. I don't know if this is enough info, but below you can see the template with the custom module (postlisting (kort nieuws)).
Template Blog Post (working)Template Blog (not working)
Yes, We are just trying that out. On blog posting, there is no meaning of the related post. It is relevant to blog posting page only.
We think you are looking for the filtering post items in post listing page, you need to add your topic name as a second option in blog_recent_topic_posts method as per below code
{% set topic_posts = blog_recent_topic_posts('default', 'your-topic', 5) %}
{% for topic_post in topic_posts %}
<div class="post-title">{{ topic_post.name }}</div>
{% endfor %}
Note: It accepts a lowercase hyphenated name. For eg. topic name is lead generation then need to add parameter as 'lead generation'.
Yes, We are just trying that out. On blog posting, there is no meaning of the related post. It is relevant to blog posting page only.
We think you are looking for the filtering post items in post listing page, you need to add your topic name as a second option in blog_recent_topic_posts method as per below code
{% set topic_posts = blog_recent_topic_posts('default', 'your-topic', 5) %}
{% for topic_post in topic_posts %}
<div class="post-title">{{ topic_post.name }}</div>
{% endfor %}
Note: It accepts a lowercase hyphenated name. For eg. topic name is lead generation then need to add parameter as 'lead generation'.
As blog structure contains HubL code which is not displayed right now, so we can't figure out the issue, can you provide limited access/scrren share, so we can look into it and resolve issue as soon as possible. or you can mail us on hello@trooinbound.com.
I've tried it, but it unfortunately doesn't work. The filter 'kort nieuws' is by the way rather important, because those are the only blogs that are supposed to be listed.