Thoughts on best practices for a View

I am just looking for some advice/ideas here. My application has multiple different settings such as finance settings, Account settings etc. Each Set of settings is a different resource. I am trying to think of a way to consolidate them to make it easy for user navigation. It would be perfect i think to have a secondary menu so Settings --Finance Settings --Status Settings etc. but that looks messy on the main nav- it would be better to have a settings menu under the user menu, but it doesnt support nested menus. My next thought would be have the Settings on the User Menu link, and have a secondary sidebar on the page, but i cant think of an easy way to do this except make every resource a custom page and add a livewire component to it for the links to the seperate menu items - seems clunky! The last idea i had was to use tabs, but i cant figure a way to load views into tabs for different resources! Any thoughts, ideas, suggestions greatly appreciated!!!
5 Replies
Brian Kidd
Brian Kidd10mo ago
I’m not familiar with this plugin but it may be an option for you: https://filamentphp.com/plugins/aymanalhattami-page-with-sidebar
Filament
Page with Sidebar by Ayman Alhattami - Filament
Organize resource pages in the sidebar to make navigation between resource pages more comfortable.
nostrodamned
nostrodamned10mo ago
Hi! I did have a look at that but it only works with resources - it wont work with table views etc as it needs a $record value although concept is exactly what i need!
thiktak
thiktak10mo ago
Hello, A solution I implemented 🙂 (waiting Aymanalhattami to review my changes before working on singles pages) 1. Create a MenuBuilder class (Menus\MySettingsMenu), and build it with all your pages & groups. 2. Create a sidebar component like this one: https://github.com/Thiktak/filament-page-with-sidebar/blob/vFilament/resources/views/components/sidebar.blade.php 3. On each page, define a custom view with grid layout On the view, call the component you created, like this file (l23) https://github.com/Thiktak/filament-page-with-sidebar/blob/vFilament/resources/views/components/page.blade.php#L23 (Play with layout if you want to build a single layout page with sidebar) 4. Pass the MenuBuilder ->getNavigation() to the component
nostrodamned
nostrodamned10mo ago
That looks very cool, i will have to play with it more tommorow, I also just had a rummage in the GitHub Repo of the filamentphp and came across....https://github.com/filamentphp/filament/pull/8102
GitHub
Support nested navigation groups by Nuhel · Pull Request #8102 · fi...
Changes have been thoroughly tested to not break existing functionality. New functionality has been documented or existing documentation has been updated to reflect changes. Visual changes are ex...
nostrodamned
nostrodamned10mo ago
I think the lads are on it!