CP 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>
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →