N
Nuxt7mo ago
Gillette

Use nested routes with an index file

Hello! In my Nuxt3 project I tend to always use folder for my pages, but I've encountered issues doing this with nested routes. The image shows my page structure, I would like to place the "settings.vue" inside the settings folder but that would create a route /settings/settings which is not what I want, and if I rename it to "index.vue" it's nested routes won't work.
No description
3 Replies
Gillette
GilletteOP7mo ago
How would I achieve a similar behavior with index then? You can't have two folders with the same name No its outside The image is the way its specified in the docs, which does work But it bothers me having a settings.vue just randomly at the root of the pages
Gillette
GilletteOP7mo ago
No description
Gillette
GilletteOP7mo ago
Its just that from a structural standpoint, it doesn't really follow the rest of the pages I have I thought I could achieve this in a cleaner way Yes, I read and understood! Shouldn't this be a parameter? Something in the definePageMeta Bah fine I'll leave it like this then But I'm not really a fan of it Thank you for you replies :) You know, this could be fixed another way If you could use a layout in a layout It would achieve the same effect in my case But to my knowledge this isn't a thing Well yeah, if you go crazy it could turn dangerous haha Well, I'll close the discussion Thank you for your support!
Want results from more Discord servers?
Add your server