wn-blog-plugin icon indicating copy to clipboard operation
wn-blog-plugin copied to clipboard

Add support for category filtering in Categories component

Open RomainMazB opened this issue 2 years ago • 0 comments

As of today, the Categories component displays a list of all categories of a blog.

I suggest that the Categories component should be able to filter a list of children categories with a categoryFilter, the same way the Posts component already does.

This would allow to display from a category page: the list of children categories, and the list of posts of this category which ease the navigation in the categories tree.

Something like:

[blogCategories]
categoryPage = "blog/category"
slug = "{{ :slug }}"
categoryFilter = "{{ :slug }}"

[blogPosts]
pageNumber = "{{ :page }}"
categoryFilter = "{{ :slug }}"
postsPerPage = 10
noPostsMessage = "No posts found"
sortOrder = "published_at desc"
categoryPage = "blog/category"
postPage = "blog/post"
==
{% component 'blogCategories' %}
{% component 'blogPosts' %}

RomainMazB avatar Sep 05 '22 12:09 RomainMazB