FilamentF
Filament2y ago
Flo

Disable sub-navigation on specify page

Hello, is it possible to disable the sub-navigation resource on certain pages only?

I have a resource that has a public function getRecordSubNavigation, but I want to hide it on a specific page of type ViewRecord.

This page is not included in the menu, but I want to disable this menu for this page.

Is it possible ?
Solution
Ok, I have the solution.

In the ViewRecord page, add this:

public function getSubNavigation(): array
{
    return [];
}
Was this page helpful?