F
Filamentβ€’3mo ago
Broemi

Breadcrumps

I don't know how to solve this. On the Event View page I don't see the right breadcrumbs. It should be Events > Name of the event > View. Anyone with a golden tip? πŸ™‚
No description
9 Replies
Dennis Koch
Dennis Kochβ€’3mo ago
There's a getBreadcrumbs() method on the EditEvent page. Just implement it and return your own breadcrumbs Filamen't default is to use the Headline for the Event name. That's why it is missing in your case
Broemi
BroemiOPβ€’3mo ago
Hi @Dennis Koch , If I do this... public function getBreadcrumbs(): array { return [ 'View' => 't', url('/events') => 'Events', // Link naar de lijst met events url("/events/{$this->record->id}") => $this->record->name, // Dynamische titel van het event // $this->record->name => 'View', ]; } Then something strange happens. View is highlighting when I hover.
Broemi
BroemiOPβ€’3mo ago
No description
Sydd
Syddβ€’3mo ago
try use on resource -> protected static ?string $recordTitleAttribute = 'name';
Broemi
BroemiOPβ€’3mo ago
That results in this... I think View in front of the title is wrong?
Broemi
BroemiOPβ€’3mo ago
No description
Dennis Koch
Dennis Kochβ€’3mo ago
Then change the title. It's because you gave a it a link
Broemi
BroemiOPβ€’3mo ago
How do you mean? I have this in the code: protected static ?string $recordTitleAttribute = 'name'; "Development Event" is the value in the column 'name' in the database. I'm confused πŸ™‚
Dennis Koch
Dennis Kochβ€’3mo ago
$recordTitleAttribute = 'name'; tells where the title of the record is. But it doesn't override the general title of a page. There should be a getTitle() method etc.
Want results from more Discord servers?
Add your server