FilamentF
Filament2y ago
Wim

Navigation for custom page

I created a custom page. Calling it from my resource:

public static function getPages(): array { return [ 'approval' => Pages\ApprovalAnimal::route('/approval'), ]; }

Then in the Pages]ApprovalAnimal I have

class ApprovalAnimal extends ListRecords { protected static string $resource = AnimalResource::class; protected static string $view = 'filament.admin.resources.animal-resource.pages.approval-animal'; function table(Table $table): Table { return $table ... }

And in the provider i have

->navigationItems([ NavigationItem::make('Mijn Approvals') ->url(fn (): string => ApprovalAnimal::getUrl()) ->icon('heroicon-o-presentation-chart-line') ->isActiveWhen(fn () => request()->routeIs('filament.admin.resources.animals.approval')) ])
All works, but it seems that also the AnimalResource is active (together with the Approval navigation item). How can I make the AnimalResource inactive? It should not be displayed as red.
image.png
Was this page helpful?