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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Dynamic filtering in page collections - how to?

Started by Muut Archive 10 years ago · 2 replies · 620 views
10 years ago

I've had a look in the page collection and taxonomies parts of the docs, and have a good idea how they'll work. What I wonder though is, how could I integrate dynamic filtering?

I have a portfolio page where I would like to list all sub pages or better previews of it. I want to integrate several 'sort by' buttons (category a, category b, client, etc.) So is something possible like: onClicksort items by client?

10 years ago

How about listing everything in the page collection but adding classes to the items using the taxonomy tags, then with onClick showing/hiding them with CSS? That might be super snappy in use for something the size of a portfolio page. If the entire list is huge then that might not be the best option.

10 years ago

Yes, I will consider this. Sounds like a nifty little solution. Thanx!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1281 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4018 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1077 9 years ago