Skip to content

What does this finalPath filter do? #35

Closed Answered by bryantgillespie
notflip asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@notflip
Comment options

@bryantgillespie
Comment options

Answer selected by notflip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants