Skip to content

Commit 0f4bc9a

Browse files
committed
docs: add detailed layout options for custom pages in documentation
1 parent d133ac2 commit 0f4bc9a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adminforth/documentation/docs/tutorial/03-Customization/06-customPages.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ new AdminForth({
441441
file: '@@/pages/TwoFactorsSetup.vue',
442442
meta: {
443443
title: 'Setup 2FA', // meta title for this page
444-
customLayout: true // don't include default layout like menu/header
444+
//diff-add
445+
sidebarAndHeader: 'none' // Layout options: 'none' (no sidebar/header), 'default' (full layout), 'preferIconOnly' (collapsed sidebar)
445446
}
446447
}
447448
}
@@ -450,6 +451,11 @@ new AdminForth({
450451
})
451452
```
452453
454+
> 💡 **Layout Options Explained:**
455+
> - `'none'`: Renders the page without AdminForth's default sidebar and header layout - perfect for standalone pages like login forms, setup wizards, or public pages
456+
> - `'default'`: Uses the full AdminForth layout with sidebar and header - ideal for pages that should feel integrated with the admin panel
457+
> - `'preferIconOnly'`: Uses the default layout but starts with a collapsed sidebar (even if icon-only sidebar is disabled in your configuration) - great for dashboard pages that need more screen space
458+
453459
This will register custom page with path `/setup2fa` and will not include it in the menu.
454460
455461
You can navigate user to this page using any router link, e.g.:

0 commit comments

Comments
 (0)