Add Other Options on filament Sidebar

I want to add more options on the sidebar that are not from filament like logout , help and settings. How best can I do that
17 Replies
toeknee
toeknee3mo ago
use the before and after render hooks
codeartisan
codeartisan3mo ago
on the sidebar do you mind sharing an example
codeartisan
codeartisan3mo ago
Thank you but seems abit confusing
toeknee
toeknee3mo ago
What seems confusing exactly? If you give an example of what you want to achive we can help.
codeartisan
codeartisan3mo ago
I want to add a logut option on the side bar I want to add 3 options Help Settings Logout
toeknee
toeknee3mo ago
So you do not want options, you want a new navigation item. you can do that in the service provider: https://filamentphp.com/docs/2.x/admin/navigation#registering-custom-navigation-items
codeartisan
codeartisan3mo ago
This seems to be a better option let me try it out and give you feedback This works but i would like toadd these options at the bottom @toeknee
toeknee
toeknee3mo ago
What options? And as per the #✅┊rules do not tag anyone.
codeartisan
codeartisan3mo ago
am sorry I will not tag anyone anymore But is there a way i can move options that are not group down
toeknee
toeknee3mo ago
As per the docs you set the sort order ->sort(3) On the custom item, then navigationsort on the resource
codeartisan
codeartisan3mo ago
NavigationItem::make('Help')
->url('https://filament.pirsch.io', shouldOpenInNewTab: true)
->icon('heroicon-c-phone')
->sort(10),
NavigationItem::make('Settings')
->url('https://filament.pirsch.io', shouldOpenInNewTab: true)
->icon('heroicon-s-cog-6-tooth')
->sort(12),
NavigationItem::make('Logout')
->url('https://filament.pirsch.io', shouldOpenInNewTab: true)
->icon('heroicon-o-arrow-left-start-on-rectangle')
->sort(12)
NavigationItem::make('Help')
->url('https://filament.pirsch.io', shouldOpenInNewTab: true)
->icon('heroicon-c-phone')
->sort(10),
NavigationItem::make('Settings')
->url('https://filament.pirsch.io', shouldOpenInNewTab: true)
->icon('heroicon-s-cog-6-tooth')
->sort(12),
NavigationItem::make('Logout')
->url('https://filament.pirsch.io', shouldOpenInNewTab: true)
->icon('heroicon-o-arrow-left-start-on-rectangle')
->sort(12)
seems the only available property is sort
codeartisan
codeartisan3mo ago
No description
codeartisan
codeartisan3mo ago
But I would like to move them at the bottom of the panel
toeknee
toeknee3mo ago
So build out the navigation groups manually as per the docs
codeartisan
codeartisan3mo ago
a good morning