Navigation
You can define a navigation object in the site settings. This allows you to create dropdown drop down menus and their children.
Navigation Object
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 |
---|---|---|
| string | This label describes what the menu section context is. It is not selectable. |
| array | This is a dropdown style parent menu that will hold sub menus. BetterForms looks to see a |
Subs Array
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 |
---|---|---|
| string | This label is the text area of each menu item |
| array | This is a dropdown style parent menu that will hold sub menus. BetterForms looks to see a |
| 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. |
| array | If a navigation item has an |
| boolean | {optional} Controls if item is visible. This key will also accept a |
| string | If key present, then the HTML value is inserted as the navigation menu item |
Element Type Order
The navigation parser classifies the navigation elements in the following hierarchy:
actions
if key present, item treated as action trigger onlypath
if path key present, item handled as regular router linksubs
If key present , item hand as a sub menuhtml
If key present, item is handled as html
Examples
Last updated