Navigation
Last updated
Last updated
You can define a navigation object in the site settings. This allows you to create dropdown drop down menus and their children.
The navigation is defined in the Appearance > Navigation tab of your site settings. It should be an array of objects, with each object defining a section of the navigation. Most apps may only have 1 navigation section.
Key | Type | Description |
---|---|---|
At the base of the navigation menu section, the subs array of objects should contain your list of menu items. Further subs
keys beyond here will create sub-menus.
Key | Type | Description |
---|---|---|
The navigation parser classifies the navigation elements in the following hierarchy:
actions
if key present, item treated as action trigger only
path
if path key present, item handled as regular router link
subs
If key present , item hand as a sub menu
html
If key present, item is handled as html
sectionLabel
string
This label describes what the menu section context is. It is not selectable.
subs
array
This is a dropdown style parent menu that will hold sub menus. BetterForms looks to see a subs
key and if present will consider this the parent.
label
string
This label is the text area of each menu item
subs
array
This is a dropdown style parent menu that will hold sub menus. BetterForms looks to see a subs
key and if present will consider this the parent.
path
string
navigational sub path e.g.: /forms/123 Use this to gain direct access to another part of your app. Alternatively, you can use a path action.
actions
array
If a navigation item has an actions
key then it is considered an actions type. The actions[ ] array can contain several actions that are chained together and passed to the actions processor.
visible
boolean
{optional} Controls if item is visible. This key will also accept a visible_calc
function for conditional visibility, but the scope of the function is bound to the entire site instead of a specific page.
html
string
If key present, then the HTML value is inserted as the navigation menu item