menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Next.js

A place to chat about Next.js and answer questions. For all other ZEIT products, check this out.

Channels
Team

Is there a way to persist a layout for a given set of routes?

September 26, 2018 at 11:04am
The Next.js community has a new home. This thread is preserved for historical purposes. The content of this conversation may be innaccurrate or out of date. Go to new community home →

Is there a way to persist a layout for a given set of routes?

September 26, 2018 at 11:04am
I see that you can modify _app.js to persist a layout between pages. But lets say I have a /home, /about, and /login page that I don't want a persisted layout. But then I have /dashboard /dashboard/clients /dashboard/statistics where I want a dashboard layout to persist. Is there a way to achieve this? Thanks :)
Show previous messages

November 6, 2019 at 10:39am
The above solutions work, how could i do something similar to what proposed but for .mdx files?
Using a static true/false works, however is it possible to implement something like Page.Layout = Layout for .mdx files?
Edited