#Intercept route group?

4 messages · Page 1 of 1 (latest)

mental hare
#

version: next 13

hi folks, i have a folder structure like:

  • static pages using markdown at: app/(static) with an mdx layout (compiles local markdown files)
  • a CMS folder at app/site/[slug] that renders cms pages (server-side, requires data fetching)
    these all share a root layout that has a header.

buuuut i want to create a route at app/embed/:whatever that can render either the static page or the CMS page with a new root layout that doesn't have a header. i was able to achieve the CMS pages at app/embed/data/[slug]

i've tried creating a folder like app/embed/(...)(static) to handle the static pages but it hasn't worked. am i doing something wrong?

exotic chasmBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

mental hare
#

would appreciate any examples that aren't in the docs as i've perused everything there including the nextgram repository (it doesn't cover my use case)

#

test cases would be like:

  • the MDX page at app/(static)/careers loads at the route /careers using the root layout
  • the CMS page at app/site/help loads at the route /site/help using the root layout
  • the route /embed/careers and /embed/help uses its own root layout separate from the other two