<p>You could leave the <em>Category URI Format</em> blank in your settings and <a href="https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules" rel="nofollow noreferrer">set an advanced route</a> in <code>config/routes.php</code> like so:</p>

<pre><code>'projects/&lt;type:{slug}&gt;/&lt;state:{slug}&gt;/&lt;location:{slug}&gt;' =&gt; ['template' =&gt; 'projects/index'],
</code></pre>

<p>Which would make <code>{{ type }}</code>, <code>{{ state }}</code> and <code>{{ location }}</code> available as variables in your template.</p>

CC BY-SA 4.0
2019-10-14T16:20:50.610Z
2019-10-14T16:20:50.610Z
Oli
<p>I need a solution for a good filter approach in Craft.</p>

<p>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?</p>

<p>Example:</p>

<pre><code>example.com/project/office/finished/germany.
</code></pre>

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

<craft3><categories><routes>
What is the best approach for multi categories filtering
# What is the best approach for multi categories filtering

(Asked by: username_0 on 2019-10-07)

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?
Example:
example.com/project/office/finished/germany.

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

**Tags:** craft3, categories, routes


---

## 1 answers

### Answer by username_1 on 2019-10-14. Score: 2

You could leave the Category URI Format blank in your settings and set an advanced route in config/routes.php like so:
'projects///' => ['template' => 'projects/index'],

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


---

