F
Filamentβ€’12mo ago
Dkil

How can I move breadcrumbs from the bottom to the top?

No description
15 Replies
Dennis Koch
Dennis Kochβ€’12mo ago
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.
Dkil
DkilOPβ€’12mo ago
Yes, through this code. FilamentView::registerRenderHook( 'panels::topbar.start', ..?????? ); But what do I write instead of the ??????? marks?
Dennis Koch
Dennis Kochβ€’12mo ago
That's what I just told I don't know
Lara Zeus
Lara Zeusβ€’12mo ago
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
Ties Pol
Ties Polβ€’10mo ago
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 ?
Lara Zeus
Lara Zeusβ€’10mo ago
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-b526bdc125fdabb19054a8fc6064da4b0e5effe61d5aa40c2c9b6409be4cc829
Ties Pol
Ties Polβ€’10mo ago
Thanks will look into it
Lara Zeus
Lara Zeusβ€’10mo ago
found out this trick \Livewire\Livewire::current()->getBreadcrumbs() it can help to get the Breadcrumbs or any other info in any hook
Pasteko
Pastekoβ€’9mo ago
Can I call that from a livewire component?
Lara Zeus
Lara Zeusβ€’9mo ago
I guess yes πŸ™‚ test it is the way if the lw component extend filament pages to get the Breadcrumbs
Pasteko
Pastekoβ€’9mo ago
it gives that : Method App\Livewire\BugReport::getBreadcrumbs does not exist.
Lara Zeus
Lara Zeusβ€’9mo ago
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 same
Pasteko
Pastekoβ€’9mo ago
I'm just trying to get the current breadcrumb for any page or resource to let user report bugs without filling the path.
Lara Zeus
Lara Zeusβ€’9mo ago
if the BugReport not extending filament pages, it wont work
Pasteko
Pastekoβ€’9mo ago
class BugReport extends Component If I replace Component by Page nothing works πŸ˜›
Want results from more Discord servers?
Add your server