django-unfold
django-unfold copied to clipboard
Add nested navigation support in sidebar
Hello,
I hope this message finds you well. I wanted to bring up a suggestion for enhancing the user experience on your great project. It would be fantastic if you could consider adding a feature that allows users to collapse the side menu for each section with a default setting (either open or closed).
Additionally, I noticed the absence of nested items, and I think it would be a valuable addition. For example:
Section 1: (collapsible) Item 1 Item 2 Nested Section 1: (collapsible) Item 1 ... Item 3 Nested Section 2: (collapsible) Item 1 ... Section 2: (collapsible) Item 1 Item 2
If the functionality is already supported, could you please guide me on how to use it or direct me to relevant documentation?
Thank you very much for considering this enhancement. I appreciate your time and effort in maintaining the project.
Best regards, Armin
👋 Hey Team,
Long time listener, first time caller.
The django-unfold project has been beneficial.
I wanted to start with genuinely appreciating all the hard work and time you have spent building something like this and making it available as opensource. I am surprised people need to talk about it more.
Just echoing @Biftor enhancement request, I was looking for some way to make the sidebar navigation collapsible and stumbled here.
I have reviewed the entire documentation and codebase (with my limited knowledge) multiple times, and I didn't find any option (please correct me if I am wrong)
If the functionality is not even on the roadmap, could I request some guidance us how we could implement it by ourself?
+1 to this feature --
For my own project, I didn't implement nested, but I was able to override the templates to add support for collapsible by overriding this template src/unfold/templates/unfold/helpers/app_list.html
See my gist for the template to override and template tags required: https://gist.github.com/thalida/bc5aa52eb3cd6dd536657b635166601a
There may be a better way than adding my own custom template tag to figure out the active items on the sidebar, but what I have works.
Added #551