Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need a second level menu

Tags:

activeadmin

Does activeadmin support 2nd level menus? For example, I tried the following to have "Safety" under "Resources" and "Cyber Security" and "Emergency Plans" under "Safety"

ActiveAdmin.register_page 'Safety' do
  menu parent:'Resources'
  content do
    render template: 'safety/safety'
  end
end


ActiveAdmin.register_page 'Cyber Security' do
  menu parent: 'Safety'
  content do
    render template: 'safety/cyber_security'
  end
end

ActiveAdmin.register_page 'Emergency Plans' do
  menu parent: 'Safety'
  content do
    render template: 'safety/emergency_plans'
  end
end

That does not work. I simply see the Safety menu item in the dropdown but I don't see the other three We are using version 0.6.6 of activeadmin.

Question: Does this version or any newer version of active-admin support multi level menus? If so, how can I do that?

like image 781
Chris Mendla Avatar asked Aug 21 '26 18:08

Chris Mendla


1 Answers

It has limited support with a feature called navigation menu, see the docs on belongs_to. Beyond that, but take a look at active_admin-subnav I hope you will consider ActiveAdmin 1.x for newer versions of Rails.

like image 159
Piers C Avatar answered Aug 27 '26 00:08

Piers C



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!