Render Hook for inserting livewire custom page into user menu?
I have several panels, and some pages are shared between panels, so I have the panel directories, and then I have a shared directory where all the pages/components live that are used in multiple panels.
I want to add a link to a user settings page, and since it will be shared, I want to put it in this shared directory. However, when I create a custom page class like I have with a lot of other use cases, and I use the
userMenuItems
userMenuItems
method on the panel provider, I get a route not defined error and I can't seem to get past it.
class Settings extends Page{ protected static string $view = 'filament.shared.pages.users.settings'; protected static ?string $slug = 'users/{userId}/settings'; protected static bool $shouldRegisterNavigation = false; public function mount(int $userId) {...
class Settings extends Page{ protected static string $view = 'filament.shared.pages.users.settings'; protected static ?string $slug = 'users/{userId}/settings'; protected static bool $shouldRegisterNavigation = false; public function mount(int $userId) {...
2 questions:
first, am I doing something wrong that would allow me to just make this work the way it's laid out above? I don't know why I can't just link to whatever page I want to, whether it's in the panel or not (I'm guessing that's the problem).
With the other pages I have that are shared, I have a custom sidebar navigation where I'm creating the
NavigationItem
NavigationItem
s manually. This is the first time I've tried to put one of these in the user menu.
second, if the above isn't going to work, is there a way to maybe use a renderhook to put a link in my user menu.
I can do this, I think, but just thinking there must be a better way.