#Pass a variable to the Layout
5 messages · Page 1 of 1 (latest)
🔎 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)
if you want a layout that's different for each page, then I think what you want is a template, because a layout is supposed to be rendered once
or instead of deoptimizing the entire layout, make the back link component a client component that reads the current segment and shows a correct back link
Thanks for your response, if I was to use a template instead is there any way to get a value from the page to the template? For instance if I had /libraries/1/books/1/edit, and I wanted to add a Back button to take someone back to /libraries/1/books, how would I do that? It looks like the segment value only returns libraries for me