Hi everyone,
First post for me so I wanted to say that I really like Kirby!
I have an issue on my new website.
I followed this tutorial (https://getkirby.com/docs/cookbook/tags) to filter blog articles. The filter system works well.
first-step.png - Google Drive
but when I click on a tag all tags disappear except the selected keyword. (it’s ok but it’s a bit weird)
Is there a way to always keep tags visible but add a active class on the active tag?
My code in the controller:
<?php
return function($site, $pages, $page) {
// fetch the basic set of pages
$articles = $page->children()->visible()->flip();
// add the tag filter
if($tag = param('tag')) {
$articles = $articles->filterBy('tags', $tag, ',');
}
// fetch all tags
$tags = $articles->pluck('tags', ',', true);
return compact('articles', 'tags', 'tag');
};
Thank you in advance!
Alexis