Skip to content

Commit a9f7278

Browse files
Learnpath: Improve LP breadcrumb labels to avoid duplication
1 parent 3f4c2fc commit a9f7278

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

assets/vue/components/Breadcrumb.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ watchEffect(() => {
303303
const toolBase = matchedRoutes[0]
304304
const currentMatched = matchedRoutes[matchedRoutes.length - 1]
305305
306-
let toolLabel = formatToolName(mainToolName)
306+
let toolLabel = toolBase.meta?.breadcrumb || formatToolName(mainToolName)
307+
307308
if (mainToolName === "ccalendarevent") {
308309
const cid = Number(route.query?.cid || 0)
309310
const gid = Number(route.query?.gid || 0)

assets/vue/router/lp.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
export default {
22
path: "/resources/lp/:node(\\d+)",
3-
meta: { requiresAuth: true, showBreadcrumb: true },
43
name: "lp",
4+
meta: {
5+
requiresAuth: true,
6+
showBreadcrumb: true,
7+
breadcrumb: "Learning paths",
8+
},
59
component: () => import("../components/lp/LpLayout.vue"),
610
redirect: { name: "LpList" },
711
children: [
8-
{ name: "LpList", path: "", component: () => import("../views/lp/LpList.vue") },
12+
{
13+
name: "LpList",
14+
path: "",
15+
component: () => import("../views/lp/LpList.vue"),
16+
meta: {
17+
breadcrumb: "",
18+
},
19+
},
920
],
1021
}

0 commit comments

Comments
 (0)