Filter via routes by URL

I make use of ‘Filtering via routes’. This outputs for example:


I was wondering if it is possible to change this somehow to:


I make use of the following route:

'routes' => [
        'pattern' => 'solutions/branche/(:any)',
        'action' => function ($branche) {
            return page('solutions')->render([
                'branche' => $branche

And controller:


return function ($page, $branche) {

    $articles = $page->children()->listed();

    if ($branche) {
        $articles = $articles->filterBy('branchecategory', $branche, ',');

    return [
        'articles' => $articles



The whole purpose of filtering via routes is to avoid using parameters or query strings. That’s why the urls become /solutions/branche/fintech

If you don’t want that, you don’t need the route but can do the filtering by query string in your controller.

1 Like

Oke! Going to try that.
Thank you :slight_smile: