What does this finalPath filter do? #35
-
I'm wondering what this filter does, and why it is needed, what problem does this solve? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's super common to have parent pages and subpages like... To achieve that without using recursive relationships on the Within Nuxt, the So the filter ensures the the route.path within Nuxt returns the homepage route, urls with any trailing slashes, and all others match the structure used within the pages collection inside Directus. |
Beta Was this translation helpful? Give feedback.
It's super common to have parent pages and subpages like...
To achieve that without using recursive relationships on the
pages
collection within Directus, one way to solve it is by instead using a permalink, instead of a slug.Within Nuxt, the
...
within [...permalink] makes it all catch all route that will catch both urls like above.So the filter ensures the the route.path within Nuxt returns the homepage route, urls with any trailing slashes, and all others match the structure used within the pages collection inside Directus.