Breadcrumbs
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.
use Statamic\CP\Breadcrumbs;
$crumbs = Breadcrumbs::make([
['text' => 'First', 'url' => '/first'],
['text' => 'Second', 'url' => '/second'],
])
return view('myview', ['crumbs' => $crumbs]);
<breadcrumbs :crumbs='@json($crumbs)'></breadcrumbs>
<template>
<breadcrumbs :crumbs="crumbs" />
</template>
<script>
export default {
data()
return {
crumbs: [
['text' => 'First', 'url' => '/first'],
['text' => 'Second', 'url' => '/second'],
]
]
}
}
</script>
Betterify this page on Github!