Hi there,
I am trying to create a virtual page to display a list of pages and filter them by tags.
My problem is, that my defined route is not getting viewed. It always shows me the error page with my default template.
I tried to setup my route via the config.php and a plugin. Both ways didn’t work.
Here is my example code:
Kirby::plugin('tagged', [
'routes' => [
[
'pattern' => 'tags/:any',
'action' => function ($tag) {
return new Page([
'slug' => 'tags/:any',
'template' => 'tags',
'content' => [
'tag' => $tag,
],
]);
},
],
],
]);
I’m using Laravel valet if that helps.
Thanks for every hint