Feb 3, 2020 11:44 AM - edited Feb 3, 2020 11:56 AM
Hello,
I've recently began having problems with making a list of blog topics appear for a certain blog.
This is the code I'm using.
<h1>Blog Topics </h1> {% set my_topics = blog_topics('993703657', 500) %} <ul> {% for item in my_topics|sort(False, False, 'name') %} <li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li> {% endfor %} </ul>
(code created by tjoyce at https://community.hubspot.com/t5/CMS-Development/How-to-show-all-topics-in-blog-listing/m-p/196160/h...)
It worked in the past, but now it always shows content from our default blog no matter what blog I specifiy. Did something change in the specs?
Feb 3, 2020 7:19 PM
The blog_topics function is now blog_tags (check out the documentation here), so if you switch is to blog_tags instead, it should work!
Stephanie O'Gay Garcia
HubSpot CMS Design & Development
If this helped, please mark it as the solution to your question, thanks!
Feb 3, 2020 9:56 PM
Stephanie,
I've swapped the code to use the current example
{% set my_tags = blog_tags('993703657', 250) %}
<ul>
{% for item in my_tags|sort(False, False, 'name') %}
<li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li>
{% endfor %}
</ul>
But it's still showing content from the default blog. Even using the pure vanilla blog listing topic code given as an example for blog_tags (which doesn't have the third to last line modified) shows the same problem.
Apr 3, 2020 5:24 PM
@Stephanie-OG Are you still there?