15 Replies
I think somesone asked this before. Not sure whether they found a solution. You'd need to render them with a render hook, but not sure how to access the current page in there.
Yes, through this code.
FilamentView::registerRenderHook(
'panels::topbar.start',
..??????
);
But what do I write instead of the ??????? marks?That's what I just told I don't know
Iv'e tried it before, when rendering the hooks , you dont have access to the current resource to get the breadcrumbs
so I am not sure what is the way
Did anyone find a solution for this?
There has to be a way right? Maybe it is possible to do the other way around, like putting the topbar inside the page @Lara Zeus ?
you can achieve that but its require you to publish the filament views and you have to be carful and keep it up to date
using
@teleport
you can see the changes here and apply the same idea to the breadcrumbs
https://github.com/lara-zeus/demo/pull/18/files#diff-b526bdc125fdabb19054a8fc6064da4b0e5effe61d5aa40c2c9b6409be4cc829Thanks will look into it
found out this trick
\Livewire\Livewire::current()->getBreadcrumbs()
it can help to get the Breadcrumbs or any other info in any hookCan I call that from a livewire component?
I guess yes π test it is the way
if the lw component extend filament pages to get the Breadcrumbs
it gives that : Method App\Livewire\BugReport::getBreadcrumbs does not exist.
not sure where the
Breadcrumbs
is! i think is for the resources only? not sure if you can set a Breadcrumb for pages
my use case was for the getTitle
but work the sameI'm just trying to get the current breadcrumb for any page or resource to let user report bugs without filling the path.
if the BugReport not extending filament pages, it wont work
class BugReport extends Component
If I replace Component by Page nothing works π