F
Filamentβ€’2mo ago
Adysone

Display breadcrumbs and title of the page in topbar

Hello, I need to display breadcrumbs and title of the page in the topbar. It works like a charm on list pages, but as soon as I go on a Edit ou Create Page, I got this error: Using $this when not in object context. I tried to use the controller in my blade template but I got another error on EditRecord page: Typed property Filament\Resources\Pages\EditRecord::$record must not be accessed before initialization You'll find the code in the code.php attached file. I don't have any clue of what I can do to reach my goal (illustrated by the screenshot). Thanks in advance!
5 Replies
Adysone
Adysoneβ€’2mo ago
hello, anyone to help me? πŸ˜„
toeknee
toekneeβ€’2mo ago
You won't be abe to use $this in pages I suspect because $this isn't define it's $record If I remember correctly? The only way I can see this working, is if you set them with JS from within the original blade. The breadcrumbs are set on the view caller natively
Adysone
Adysoneβ€’2mo ago
So, I can't access the $record from the topbar-title blade view?
toeknee
toekneeβ€’2mo ago
Not to my knowlage as it's outside of the component
Adysone
Adysoneβ€’2mo ago
Ok, thanks!
Want results from more Discord servers?
Add your server