Nuxt Layout with named slot
Hello,
I'm using a layout in a component with named slot and a default slot, but i faced this issue (in image) about template, how to fix it ?🤔
Thanks
11 Replies
can you also show the code? 🙂
That's my two files,
link.vue (a layout)
and contact.vue
that use that layoutdoes it actually not work or is just IDE complaining?
It doesn't work
what if you move the template outside the div?
Same problem, I have to use Nuxtlayout components explicitly
Do this instead, Sorry I am using pug, but simply you need to use <nuxt-layout name="links" />. Note you need also set the definePageMeta({
layout: "another-layout",}),
yes i mentioned it before, only explicitly
NuxtLayout component
seems to work hereOh, Ok missed that
Then I am interested in this solution as well. Cause I think I have once had this usecase
maybe @manniL / TheAlexLichter can exeplain it to us
what if you want the template inside a child page?
like a page title for each page