Working with the menu

How the menu works

The menu composition depends on the set of roles of the current user. 

The menu is generated via a stored procedure as_pg_getMenuPages. You can customize this procedure for atypical cases of menu construction (for example, adding dynamic elements to the menu). 

The menu is cached for a set of user roles.

Menu Features

  • The ability to make a horizontal / vertical menu. For the horizontal menu, we prescribe in GetLayout in bodyClass as-horizontalMainMenu
  • Separate user service menu. 
  • The first level of nesting
  • Icons for elements
  • Subheadings in the menu
  • Ability to insert badges in the menu
  • Ability to specify external pages
  • Opening the menu on the smartphone by moving your finger to the right + the menu on the smartphone opens on the right (for ease of operation with the thumb of the right hand). 
  • A separate service menu for the user. Opens at the top right. Setting up in SELECT 4 in GetLayout
  • Additional horizontal menu. Setting up in SELECT 2 in getLayout (also in SELECT 1 getLayout, the output of this menu should be registered)

Setting up the menu

The menu is formed based on the pages that have a flag in the menu. Also, in the page settings, you can set the order (where it is in the menu), the parent, the pre-title and the icon. More.

IMPORTANT. Do not forget to clean the cache when updating the page settings to view changes. 

The menu is controlled on the /menu page. All pages with the attribute In the menu are displayed here, as well as a list of static menu items (table as_menu).

HowTo by menu

1. Embed dynamically elements in the menu - customize as_pg_getMenuPages

2. To make the left menu stationary-we prescribe in GetLayout in bodyClass as-stickyLeft

3. Remove the ability to open the menu in mobile devices with a finger movement - we prescribe in GetLayout in bodyClass as-disableSlideoutMenu

4. Add an additional link to the menu - in /menu add a new page among the static pages (name, url, selection pattern, role, etc.) and clear the cache.

5. How to make a JS callback for loading the menu

6. How to set up an additional small menu at the bottom of smartphone screens

Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started