Tab Routing
Unanswered
Prairie yellowjacket posted this in #help-forum
Prairie yellowjacketOP
I have a dynamic route for containers that follow the schema:
But within this page there are tabs such as
I want to find a way to make it possible so that the url when it matches:
it will stay on the same initial container page, but switch to a seperate tab on the same page.
How do i achieve this? I've taken a look at parallel routes but i'm not sure how they work.
http://127.0.0.1:3000/dashboard/containers/[id]But within this page there are tabs such as
Overview, Logs and Domains.I want to find a way to make it possible so that the url when it matches:
http://127.0.0.1:3000/dashboard/containers/[id]/logsit will stay on the same initial container page, but switch to a seperate tab on the same page.
How do i achieve this? I've taken a look at parallel routes but i'm not sure how they work.
1 Reply
@Prairie yellowjacket I have a dynamic route for containers that follow the schema:
http://127.0.0.1:3000/dashboard/containers/[id]
But within this page there are tabs such as ``Overview, Logs and Domains``.
I want to find a way to make it possible so that the url when it matches:
http://127.0.0.1:3000/dashboard/containers/[id]/logs
it will stay on the same initial container page, but switch to a seperate tab on the same page.
How do i achieve this? I've taken a look at parallel routes but i'm not sure how they work.
Dutch
I've implemented something like this in my projects.
What I tend to do is put the header with the tabs in the layout.tsx file, and then watch the pathname to check whether the tab is active or not.
What I tend to do is put the header with the tabs in the layout.tsx file, and then watch the pathname to check whether the tab is active or not.