History: Menu Handler
Preview of version: 14
This is a handler to create menus and options. A menu object is the equivalent of a menu, a user module and a module in TikiWiki. It also contains all the options.
To create a menu which will not be in a module (ex.: for top or bottom), just ommit the module specific parameters (ex.: right/left, etc.)
This profile will create a file gallery and an option in a menu to goto this file gallery
To create a menu which will not be in a module (ex.: for top or bottom), just ommit the module specific parameters (ex.: right/left, etc.)
Complete sample for a basic menu
YAML
Copy to clipboard
objects: - type: menu ref: my_menu data: name: My Menu description: A menu containing the base navigation of the site collapse: none position: left order: 1 groups: [ Anonymous ] items: - name: Home url: ((HomePage)) groups: [ Anonymous ] - name: Private Area url: ((PrivateArea)) groups: [ Registered ] items: - name: Forum url: tiki-forums.php - name: Administration url: tiki-admin.php permissions: [ admin ] items: - name: Account Moderation url: tiki-adminusers.php permissions: [ admin_users ]
Menu Object
Field Name | Mandatory | Value |
name | yes | The name of the module as listed in the administration panel. |
description | Menu description | |
collapse | collapsed, expanded or none, default is collapsed | |
icon | Icon to be used for collapsable items, see menu documentation | |
items | yes | List of item objects, see below |
position | left or right, required to add as module | |
module_arguments | If extra arguments must be passed to the {menu} tag in the user module (see Split_Level_Menu) | |
order | Numeric value, lower values are displayed above, required to add as module | |
cache | Default 0, time to cache in seconds, only used when added as module | |
groups | List of group names allowed to view the module, only used when added as module |
Item Object
Field Name | Mandatory | Value |
name | yes | Item label |
url | yes | Item URL or wiki page name as ((PageName)) |
items | List of children item objects | |
groups | List of groups allowed to view the item | |
permissions | List of permissions required to view the item | |
level | ? | |
section | ? |
Menu option Handler
Copy to clipboard
objects: - type: file_gallery ref: team_gallery data: name: $profilerequest:team_name$team$ mode: create_or_update parent: 3 - type: menu_option data: name: Knowledgebase url: file$profileobject:team_gallery$ menuId: 45 position: 40 groups: [$profilerequest:team_name$team$]
This profile will create a file gallery and an option in a menu to goto this file gallery