Make it look like I am on a different Page in the navigation
I have the page /vet-profiles (Filament/Pages/VetProfiles.php) showing in my navigation.
I also have the page -/vet-profile (Filament/Pages/VetProfile.php). I do not show this page in my navigation.
When I am on the Vet Profile page, I want the Vet Profiles navigation item to be highlighted as if I am on it.
Is this possible?
Solution:Jump to solution
I got it working. On VetProfiles I added:
``` public static function getNavigationItems(array $urlParameters = []): array
{
return [...
3 Replies
No idea what you're doing, but you could overwrite the
getNavigationItems() method on the VetProfiles page and provide your own condition:
This is the default:
@Dennis Koch Thanks. When I try this I get the error:
App\Filament\Pages\VetProfiles::getNavigationItems(): Return value must be of type array, Filament\Navigation\NavigationItem returned
What I am trying to do is make the VetProfiles main nav item highlight as selected when I am on the VetProfile page. I have tried injecting a dom ID into the VetProfiles menu item but no luck so far.Solution
I got it working. On VetProfiles I added:
On VetProfile I added:
Thanks for your help, much appreciated.