How to sort navigation items within a navigation group?
If I put a resource in a
$navigationGroup
, the
variable doesn't seem to change the sorting within the group. Is there any other way to manipulate the order in the group?2 Replies
You can define Navigation Groups in panel provider.
https://filamentphp.com/docs/3.x/panels/navigation#customizing-navigation-groups
or
https://filamentphp.com/docs/3.x/panels/navigation#ordering-navigation-groups
The order of the array elements here directly generates the navigation order.
Then you can order items in group with $navigationSort in pages or resources.
Thanks,
$navigationSort
actually does work within navigation groups as well. I was thrown off by the sorting of a third-party plugin page.