From f044aab67ccd96308e49c164b264ce40cef57637 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 26 Jul 2025 00:57:20 +0200 Subject: [PATCH] Add start to breadcrumb --- components/EventManager.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/EventManager.php b/components/EventManager.php index 79c63cd..c606abb 100644 --- a/components/EventManager.php +++ b/components/EventManager.php @@ -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, ]);