This model holds the admin menu, which is built up by calling each module to add items to the menu.

Extending the admin menu

By implementing the admin_menu notification you can add your own menu items to the admin menu. The admin_menu notification is a fold which build up the menu, allowing each callback to add and remove menu items as they wish.

For example, this add a menu separator and an “edit homepage” button to the “content” submenu:


observe_admin_menu(admin_menu, Acc, _Context) ->
      label="Edit homepage",
      url={admin_edit_rsc, [{id, page_home}]}}

The default submenu names are admin_content, admin_structure, admin_modules, admin_auth and admin_system, but you are free to add your own submenus.