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? π
9 Replies
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 caseHi @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.
try use on resource ->
protected static ?string $recordTitleAttribute = 'name';
That results in this...
I think View in front of the title is wrong?
Then change the title.
It's because you gave a it a link
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 π
$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.