Hi all,
I want to have my blog pages as follow:
- Books (category)
-- Fiction (subcategory)
--- Blogposts (posts)
-- Non-Fiction (subcategory)
--- Blogposts (posts) - Movies (category)
-- Action (subcategory)
--- Blogposts (posts)
In Books and Movies, I want to show only the connected subcategories of the category. There's the "categoryList" available but that one will show all categories as a list. I want to have similar as you can do in a post to get the categories
{% for category in post.categories|sort %}
{% if category.parent %}
<a href="/{{ category.parent.slug }}/{{ category.slug }}">{{ category.name }}</a>
{% else %}
<a href="/{{ category.slug }}">{{ category.name }}</a>
{% endif %}
{% endfor %}
Anyone an idea on this matter?
Last updated