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
hello, anyone to help me? π
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
So, I can't access the $record from the topbar-title blade view?
Not to my knowlage as it's outside of the component
Ok, thanks!