forked from statamic/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c52384
commit 0f05477
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Breadcrumbs | ||
id: a96676fe-0ec4-41f5-9205-2fe47988addb | ||
intro: | | ||
At the top of most pages in the control panel, you will see a title with breadcrumbs sitting above. Statamic provides | ||
ways to generate these links without you having to worry about manually generating the HTML. | ||
--- | ||
``` php | ||
use Statamic\CP\Breadcrumbs; | ||
|
||
$crumbs = Breadcrumbs::make([ | ||
['text' => 'First', 'url' => '/first'], | ||
['text' => 'Second', 'url' => '/second'], | ||
]) | ||
|
||
return view('myview', ['crumbs' => $crumbs]); | ||
``` | ||
|
||
``` blade | ||
<breadcrumbs :crumbs='@json($crumbs)'></breadcrumbs> | ||
``` | ||
|
||
``` vue | ||
<template> | ||
<breadcrumbs :crumbs="crumbs" /> | ||
</template> | ||
<script> | ||
export default { | ||
data() | ||
return { | ||
crumbs: [ | ||
['text' => 'First', 'url' => '/first'], | ||
['text' => 'Second', 'url' => '/second'], | ||
] | ||
] | ||
} | ||
} | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters