F
Filamentβ€’4w 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β€’4w 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
Broemiβ€’4w 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
Broemiβ€’4w ago
No description
Sydd
Syddβ€’4w ago
try use on resource -> protected static ?string $recordTitleAttribute = 'name';
Broemi
Broemiβ€’4w ago
That results in this... I think View in front of the title is wrong?
Broemi
Broemiβ€’4w ago
No description
Dennis Koch
Dennis Kochβ€’4w ago
Then change the title. It's because you gave a it a link
Broemi
Broemiβ€’4w 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β€’4w 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