Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for category filtering in Categories component #26

Open
RomainMazB opened this issue Sep 5, 2022 · 0 comments · May be fixed by #27
Open

Add support for category filtering in Categories component #26

RomainMazB opened this issue Sep 5, 2022 · 0 comments · May be fixed by #27

Comments

@RomainMazB
Copy link
Contributor

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' %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants