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
toeknee9mo ago
use the before and after render hooks
codeartisan
codeartisanOP9mo ago
on the sidebar do you mind sharing an example
codeartisan
codeartisanOP9mo ago
Thank you but seems abit confusing
toeknee
toeknee9mo ago
What seems confusing exactly? If you give an example of what you want to achive we can help.
codeartisan
codeartisanOP9mo ago
I want to add a logut option on the side bar I want to add 3 options Help Settings Logout
toeknee
toeknee9mo 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
codeartisanOP9mo 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
toeknee9mo ago
What options? And as per the #✅┊rules do not tag anyone.
codeartisan
codeartisanOP9mo ago
am sorry I will not tag anyone anymore But is there a way i can move options that are not group down
toeknee
toeknee9mo ago
As per the docs you set the sort order ->sort(3) On the custom item, then navigationsort on the resource
codeartisan
codeartisanOP9mo 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
codeartisanOP9mo ago
No description
codeartisan
codeartisanOP9mo ago
But I would like to move them at the bottom of the panel
toeknee
toeknee9mo ago
So build out the navigation groups manually as per the docs
codeartisan
codeartisanOP9mo ago
a good morning
Want results from more Discord servers?
Add your server