Skip to content

Commit 805f597

Browse files
committed
Implement Breadcrumbs & Document Title
1 parent 61f0206 commit 805f597

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

app/assets/router/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const router = createRouter({
2121
meta: {
2222
auth: {
2323
redirect: { name: 'account.login' }
24-
}
24+
},
25+
title: 'About'
2526
},
2627
component: () => import('../views/AboutView.vue')
2728
},
@@ -32,7 +33,10 @@ const router = createRouter({
3233
{
3334
path: '/admin',
3435
component: () => import('../layouts/LayoutDashboard.vue'),
35-
children: [...AdminRoutes]
36+
children: [...AdminRoutes],
37+
meta: {
38+
title: 'Admin'
39+
}
3640
}
3741
]
3842
})

app/assets/views/AboutView.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
<script setup lang="ts">
2+
import { onMounted } from 'vue'
3+
import { usePageMeta } from '@userfrosting/sprinkle-core/composables'
4+
const page = usePageMeta()
5+
6+
// Hide the title on this page
7+
onMounted(() => {
8+
page.hideTitle = true
9+
})
10+
</script>
111
<template>
212
<h1>This is an about page</h1>
313
<p>

0 commit comments

Comments
 (0)