InteractsWithRecord + Clusters = Not possible?
Using custom Filament page (\Filament\Pages)
Page is within a Cluster.
What I want to achieve:
Having user/{tenant}/cluster/{model}/page work - working with a specific record in a custom Page, where the Page is inside a Cluster.
On the Cluster class, I define slug:
On the Page class, I define this:
php artisan route:list declares this:
View looks like this
I get the error:
If I set getSubNavigation to return an empty array (the breadcrumbs), I get the page to render.
What am I missing - feels like I'm over-complicating this?
6 Replies
Page seems to use HasSubNavigation, which calls the function generateNavigationItems.
If it's not a resource page, parameters are not sent through
Overriding getUrl() in the Page class is also a no-go because it is static and has no context action.
There's something I'm overlooking but can't figure out what.
^ Bump
InteractsWithRecord
probably needs $record
. You defined $service
though,.
return '{record}/page';
Already tried that sadly, meaning replaces all "service" with $record and modiifed mount function in various ways
Where is the error thrown? I see it’s from the route not from the mounting. So there aren’t enough arguments passed somewhere
It's from HasSubNavigation which is part of <x-filament-panels::page>.
Specifically the function generateNavigationItems
And what I believe to be the "current page" url in the breadcrumbs that is not receiving the record
If it's a bug I'm happy to PR it - but I think I am overlooking something as I'm sure many have done this previously.
@Zep Fietje Is this something you can help with if I pay the £200 consultation fee?
I simply want to edit a record on a custom Filament page, that is within a Cluster and uses the standard <x-filament-panels::page> in the view.
Happy to help debugging on a session 👍