Skip to content

Add support for category filtering in Categories component #26

@RomainMazB

Description

@RomainMazB

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' %}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions