Add start to breadcrumb
This commit is contained in:
parent
3120ea4692
commit
f044aab67c
|
@ -43,11 +43,12 @@ abstract class EventManager extends ComponentBase
|
|||
private function getBreadcrumbs(): Collection
|
||||
{
|
||||
$breadcrumbs = collect([]);
|
||||
$breadcrumbs->push(['url' => '/', 'title' => 'Start', 'isActive' => false]);
|
||||
$breadcrumbs->push(['url' => $this->settings['indexUrl'], 'title' => 'Veranstaltungen', 'isActive' => $this->event === null]);
|
||||
|
||||
if ($this->event) {
|
||||
$breadcrumbs->push([
|
||||
'url' => (string) str($this->settings['singleUrl'])->replace(':slug', $this->event['slug']),
|
||||
'url' => str($this->settings['singleUrl'])->replace(':slug', $this->event['slug'])->toString(),
|
||||
'title' => $this->event['name'],
|
||||
'isActive' => !$this->isRegistering()
|
||||
]);
|
||||
|
@ -55,7 +56,7 @@ abstract class EventManager extends ComponentBase
|
|||
|
||||
if ($this->event && $this->isRegistering()) {
|
||||
$breadcrumbs->push([
|
||||
'url' => (string) str($this->settings['registerUrl'])->replace(':slug', $this->event['slug']),
|
||||
'url' => str($this->settings['registerUrl'])->replace(':slug', $this->event['slug'])->toString(),
|
||||
'title' => 'Anmeldung',
|
||||
'isActive' => true,
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue