SagorIslam's avatar

3rd level of menu in filament v3

Hello, I want to make a 3rd level menubar in filament v3. I used this but it's not working. This means if I use "$navigationParentItem," the menu disappears and if I comment out this, the menu shows up. And the 3rd level of the menu is not working. Please help me to solve the issue. Thanks

Resource file

protected static ?string $navigationLabel = 'Notifications';
protected static ?string $navigationParentItem = 'Notifications';
protected static ?string $navigationGroup = 'Settings';
protected static ?int $navigationSort = 0;

AdminPanel file

->navigationGroups([
                'Home',
                'Ecommerce',
                'Men/Women',
                'Settings',
            ])
0 likes
3 replies
tisuchi's avatar
tisuchi
Best Answer
Level 70

@sagorislam Make sure that the $navigationParentItem refers to the correct parent. If the parent item doesn’t exist or is misconfigured, the child items may not display correctly.

For example:


// For the top-level menu item
protected static ?string $navigationLabel = 'Notifications';
...
protected static ?int $navigationSort = 0;

// For the second-level menu item
protected static ?string $navigationLabel = 'Email Notifications';
protected static ?string $navigationParentItem = 'Notifications';   // Really important, make sure to set this correctly
...
protected static ?int $navigationSort = 1;

// For the third-level menu item
protected static ?string $navigationLabel = 'Subscription Emails';
protected static ?string $navigationParentItem = 'Email Notifications';     // Really important, make sure to set this correctly
...
protected static ?int $navigationSort = 2;

2 likes
tapanbasuli's avatar

It that working? Can you share me navigation menu code. I'm looking for build 3 level menu. Thanks.

Please or to participate in this conversation.