Skip to content

Commit 0f05477

Browse files
committed
Breadcrumbs
1 parent 7c52384 commit 0f05477

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Breadcrumbs
3+
id: a96676fe-0ec4-41f5-9205-2fe47988addb
4+
intro: |
5+
At the top of most pages in the control panel, you will see a title with breadcrumbs sitting above. Statamic provides
6+
ways to generate these links without you having to worry about manually generating the HTML.
7+
---
8+
``` php
9+
use Statamic\CP\Breadcrumbs;
10+
11+
$crumbs = Breadcrumbs::make([
12+
['text' => 'First', 'url' => '/first'],
13+
['text' => 'Second', 'url' => '/second'],
14+
])
15+
16+
return view('myview', ['crumbs' => $crumbs]);
17+
```
18+
19+
``` blade
20+
<breadcrumbs :crumbs='@json($crumbs)'></breadcrumbs>
21+
```
22+
23+
``` vue
24+
<template>
25+
<breadcrumbs :crumbs="crumbs" />
26+
</template>
27+
<script>
28+
export default {
29+
data()
30+
return {
31+
crumbs: [
32+
['text' => 'First', 'url' => '/first'],
33+
['text' => 'Second', 'url' => '/second'],
34+
]
35+
]
36+
}
37+
}
38+
</script>
39+
```

content/structures/extending-docs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ tree:
3030
entry: aa6e0a79-9d3f-493b-92c9-df4d2257bc64
3131
-
3232
entry: b4b46ceb-9feb-4587-8f0d-2080511bf9e3
33+
-
34+
entry: a96676fe-0ec4-41f5-9205-2fe47988addb
3335
-
3436
title: Javascript
3537
children:

0 commit comments

Comments
 (0)