#Shared Layouts with SolidStart

2 messages · Page 1 of 1 (latest)

minor horizon
#

I wondered if its possible to have a shared Layout for
the routes
/ and /pricing
but not for /dashboard
e.g. I have a navbar I want to show only on that routes.
From the docs it seems like it's only possible for pages inside folders so
/landing/
/landing/pricing
having a different layout then
/dashboard
would work?

silver ingot
#

I think you are looking for route groups

I believe it goes something like this:

|-routes/
  |-dashboard
  | |-index.tsx
  |
  |-(main).tsx // layout for `/` and `/pricing`
  |-(main)
    |-index.tsx   // `/`
    |-pricing
      |-index.tsx // `/pricing`