© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
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'),
        ];
    }
    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 ...
   }
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'))
                  
            ])

            ->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
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

navigation with custom page
FilamentFFilament / ❓┊help
3y ago
Sub Navigation in ListView for Custom Page
FilamentFFilament / ❓┊help
3y ago
Set custom page navigation as active without custom navigation
FilamentFFilament / ❓┊help
17mo ago
sub navigation in custom page
FilamentFFilament / ❓┊help
3y ago