How I can use static url params for filtering data?
Answered
Vadym posted this in #help-forum
VadymOP
Hello everyone!
I’m looking for advice, on how I can make filters exactly this way:
https://mydomain.com/new-york/pizza/30-30
I have the option to make it via optional catch-all segments, but I don’t have an idea how to do it without additional attachments (like /pages/pizza/[[…pizza]].page.tsx)
Thanks in advance for any suggestions!
I’m looking for advice, on how I can make filters exactly this way:
https://mydomain.com/new-york/pizza/30-30
I have the option to make it via optional catch-all segments, but I don’t have an idea how to do it without additional attachments (like /pages/pizza/[[…pizza]].page.tsx)
Thanks in advance for any suggestions!
Answered by joulev
you have to use catch-all segments here, like
if not, why not just
[[...pizza]] that you said above, if you want to accept /new-york/pizza/30-30 and /30-30/new-york and /pizza/30-30 and so on at the same time.if not, why not just
[location]/[name]/...?2 Replies
@Vadym Hello everyone!
I’m looking for advice, on how I can make filters exactly this way:
https://mydomain.com/new-york/pizza/30-30
I have the option to make it via optional catch-all segments, but I don’t have an idea how to do it without additional attachments (like /pages/pizza/[[…pizza]].page.tsx)
Thanks in advance for any suggestions!
you have to use catch-all segments here, like
if not, why not just
[[...pizza]] that you said above, if you want to accept /new-york/pizza/30-30 and /30-30/new-york and /pizza/30-30 and so on at the same time.if not, why not just
[location]/[name]/...?Answer