Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Displaying `category:X` results

Started by Muut Archive 10 years ago · 1 replies · 299 views
10 years ago

With the default blog themes, requesting /category:X gets a page showing the various pages that match that category. I'm creating a new theme (blog-like, but not really a blog) and I want to do the same thing. Do I just have to create a blog.html.twig and blog_item.html.twig pair? Are these file names hard coded somewhere? Or is there a way I can tell Grav what template to load when /category:X is requested? Thanks!

10 years ago

Basically those param-based filters will filter any page that defines a page collection (like blog.md). So you can use them on any page that has a collection defined in it's frontmatter.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2955 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago