Take the 2-minute tour ×

How do you add your own custom links dynamically to the ActiveAdmin global navigation header other than registering the pages/models? For example, if I want a link that can direct users to my home page for instance.

share|improve this question

3 Answers 3

Seems like ActiveAdmin made it somewhat easier. I upgraded to version 0.6.2 and here is what you can do to add custom links anywhere in your navigation (the example below will add one custom menu item, and one custom dropdown):

In # config/initializers/active_admin.rb

ActiveAdmin.setup do |config|
  config.namespace :admin do |admin|
    admin.build_menu do |menu|
      menu.add :label => "My Custom Link", :url => "/", :priority => 0

      menu.add :label => "Pages" do |pages|
        pages.add :label => "Homepage", :url => "/admin/homepage"
        pages.add :label => "About Us", :url => "/admin/about-us"
        pages.add :label => "Facebook", :url => "http://www.facebook.com", :html_options => { :target => "_blank" }

In case you already registered models with "Pages" as a parent menu (ie: in your app/admin/ folder, a model with menu :priority => 2, parent: 'Pages') it will keep those as well automatically!

share|improve this answer

I managed to to this by adding the ActiveAdmin::MenuItem to the current AdminAdmin controller. For example,

ActiveAdmin.register User, :name_space => :example_namespace do
  controller do
    def current_menu
      item = ActiveAdmin::MenuItem.new :label => "Link Name", :url => 'http://google.com'

I basically created a new ActiveAdmin::MenuItem and add it to the current ActiveAdmin menu with the namespace example_namespace and return the menu in the end of the current_menu method. Note: current_menu is a method expected by ActiveAdmin so don't change the name of it. You can add as many items you like and each of these items will be converted to a link on your navigation header. Note this works for ActiveAdmin version > 0.4.3 so you might need to do your own digging if you want to do it for version <= 0.4.3.

share|improve this answer
nice work! I'm glad you posted this question and answer! –  Ivanoats Jul 19 '12 at 22:25
I'm glad it helps :) –  RubyFanatic Jul 19 '12 at 23:46

You can configure the site title in your active admin initializer. For example:

    config.site_title_link = "/"

This will give you a link to your rootpage.

share|improve this answer

Your Answer


