Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/content/2.guide/3.directory-structure/6.layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ Even if you are using the `~/pages` integration, you can take full control by us

```vue [pages/index.vue]
<template>
<NuxtLayout name="custom">
<template #header> Some header template content. </template>
<div>
<NuxtLayout name="custom">
<template #header> Some header template content. </template>

The rest of the page
</NuxtLayout>
The rest of the page
</NuxtLayout>
</div>
</template>

<script setup>
Expand All @@ -118,6 +120,10 @@ definePageMeta({

::

::alert{type=warning}
If you use `<NuxtLayout>` within your pages, make sure it is not the root element (or disable layout/page transitions).
::

## Example: changing the layout

You can also use a ref or computed property for your layout.
Expand Down