How could I set up nested item in menu sidebar? #262
Answered
by
excid3
monkjunior
asked this question in
Q&A
-
|
Hi Chris, I just saw you update the demo image that show up a group of nested items in menu sidebar. How could we do that? I did not see that in the instructions. Hope the documentation could include this. It must be very helpful for beginners. Thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
excid3
Mar 18, 2025
Replies: 1 comment 1 reply
-
|
It works like this: # config/initializers/madmin.rb
Madmin.site_name = Jumpstart.config.application_name
Madmin.menu.before_render do
add label: "Sidekiq", url: Rails.application.routes.url_helpers.madmin_sidekiq_web_path, position: 1 if defined? ::Sidekiq::Web
add label: "Users & Accounts", position: 2
add label: "Payments", position: 3
add label: "Resources", position: 4
end# app/madmin/resources/user_resource.rb
class UserResource < Madmin::Resource
menu parent: "Users & Accounts", position: 1
# ...
end |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
monkjunior
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works like this: