glFusion Wiki

Site Tools


Menu Builder

Menu Builder allows you to have full control over the navigation menu on your site. You can create a custom menu that meets your needs perfectly.

Once you select a menu to edit, Menu Builder displays the current navigation menu options.

This screen shows the current menu structure. By hovering over the Info icon, you can see information about the menu element.

You can also change the order of the elements by moving them around using the and icons.

To edit the menu element, select the icon.

Creating / Editing Menu Items

When you create or edit a menu element, the entry screen is dynamic and will change depending on the selections. For example, when you choose the Parent, the Display After select box will automatically update to show the existing menu items in that menu. When you select Type, the following entry field will change to reflect the Type selection.

Types of Menus

A sub-menu is a parent for other menu elements. A sub-menu can have its own URL, or the URL field can be empty in which case the label will not be selectable.
glFusion Action
This allows you to select several glFusion standard functions for this menu item. Functions include:
Displays a link to the site's home page (main index page)
Link to the story submission page
Link to the Story Directory Page - Displays all story titles by month
Navigates to the user preference page
Link to the Search Page
Site Stats
Link to the Site Statistics page
glFusion Menu
This allows you to select from several glFusion standard menus. Menus include:
User Menu
Standard user menu - for non-logged-in users, displays the login box, for logged-in users displays links to My Account
Admin Menu
A hierarchical menu of all Administrative actions available to the current user
Topics Menu
A hierarchical menu of all topics available to the user (based on topic permissions)
Static Pages Menu
A hierarchical menu of all Static Pages where Add to Menu was selected
Plugin Menu
A hierarchical menu of all plugins available to the current user
Header Menu
Allows you to select access to any of the installed plugins.
External URL
You can specify a direct URL. Menu Builder understands two macros %site_url% will be replaced with the URL to your site. %site_admin_url% will be replaced with the URL to your admin directory.
PHP Function
You can specify a PHP function be called when a menu item is selected.

The PHP function needs to return an array of elements with the following array fields; label, url, target. For example, to return 2 menu entries it would create an array like this:
  function test_menu()
      $menuItems = array(
                  array(   'label' =>   'Item 1',
                           'url'   =>  '',
                           'target' => ''
                  array ( 'label' => 'item 2',
                          'url'   => '',
                          'target' => '_blank'
      return $menuItems;
You can use PHP logic to determine what menu entries should be returns.

In this example, you would enter test_menu as the PHP function name in the Menu Builder entry field.


Each menu item will have a label to describe that menu entry. Labels can include a small subset of HTML to allow some enhanced styling. The allowed HTML is:


This allows you to specify icons using UIKIT's FontAwesome. Please see the Available Icons list for a full list of all available icons in glFusion.

For example - to add a Home Icon to the Home link, you could use a label similar to this:

<i class="uk-icon-home uk-animation-hover uk-animation-reverse uk-animation-scale"></i> Home

This example uses the uk-icon-home icon with the following UIKIT styles:

glFusion Menus will automatically list sub-menus generated in the core code. In the Menu Builder admin screens, you will not see entries for each of these sub-menus, since they are dynamically built.

Controlling Access to Menu Elemets

The Visible To: field controls who can see the menu item. This list contains all the groups defined on your site.

2016/07/16 19:39
glfusion/siteadministration/menubuilder.txt · Last modified: 2017/01/18 06:50 (external edit)

Page Tools