mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
36 lines
611 B
Markdown
36 lines
611 B
Markdown
|
#NorthHeaderBreadcrumbs
|
||
|
|
||
|
The breadcrumbs for the current section of the CMS.
|
||
|
|
||
|
## Props
|
||
|
|
||
|
### Crumbs (array)
|
||
|
|
||
|
An array of objects, each object should have a `text` and `href` key.
|
||
|
|
||
|
```
|
||
|
import NorthHeaderBreadcrumbsComponent from 'north-header-breadcrumbs';
|
||
|
|
||
|
...
|
||
|
|
||
|
getBreadcrumbs() {
|
||
|
var breadcrumbs = [
|
||
|
{
|
||
|
text: 'Pages',
|
||
|
href: 'admin/pages'
|
||
|
},
|
||
|
{
|
||
|
text: 'About us',
|
||
|
href: 'admin/pages/show/2'
|
||
|
}
|
||
|
];
|
||
|
|
||
|
return breadcrumbs;
|
||
|
}
|
||
|
|
||
|
render() {
|
||
|
return <NorthHeaderBreadcrumbsComponent crumbs={this.getBreadcrumbs()} />
|
||
|
}
|
||
|
|
||
|
...
|
||
|
```
|