I need a solution for a good filter approach in Craft.

I used 3 Categories related to an entry (Project). The 3 Categories are (Type / State / Location) How do I have to set up the routes for the multiple slugs?



I already fetch projects with AJAX for one category, but it should also work with a combination of categories.

1 Answer 1


You could leave the Category URI Format blank in your settings and set an advanced route in config/routes.php like so:

'projects/<type:{slug}>/<state:{slug}>/<location:{slug}>' => ['template' => 'projects/index'],

Which would make {{ type }}, {{ state }} and {{ location }} available as variables in your template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.