Package DE_EPAGES::Presentation::API::TLE::MenuHandler
Implements the TLE block "MENU".
Functions
MENU
Use this statement to display the content of a menu. The following TLE variables are available inside the menu block:
- Template - menu item template name (used by INCLUDE) - string
- MenuID - menu item id - integer
- Position - relative menu item position - integer
- MenuItemNo - actual menu item index (0, 1, 2, ...) - integer
- URLAction - action alias - string
- Action - action object (see class: Action) - object
- IsActive - true if the menu item is currently selected - boolean
- HelpFileTopic - URL of the help file topic - string
Syntax |
#MENU(#Name, #Separator) ... #ENDMENU old syntax: #BLOCK("MENU", #Name, #Separator) ... #ENDBLOCK |
Example |
#IF( #MENU_COUNT("Tabs") > 0 ) <ul> #MENU( "Tabs", "|" ) <li>#INCLUDE(#Template)</li> #ENDMENU </ul> #ENDIF |
Input |
|
MENU_COUNT
Returns the number of items in a menu.
Syntax |
#MENU_COUNT(#Name) |
Example |
#MENU_COUNT("Tabs") |
Input |
|
MENU_ID
Returns the identifier of a menu.
Syntax |
#MENU_ID(#Name) |
Example |
#MENU_ID("Tabs") |
Input |
|
MENU_JSON
Use this statement to get the content of a json menu.
Syntax |
#MENU_JSON(#Name, #HashName, #FromJSON) |
Example |
<ul> #LOOP( #MENU_JSON("BatchActions", "", 1) ) <li><a href="#Action">#Name</a></li> #ENDLOOP </ul> #LOCAL( "BatchMenu", "" ) #SET( "BatchMenu", #FROM_JSON(#MENU_JSON( "BatchActions", "")) ) <ul> #LOOP( #BatchMenu ) <li><a href="#Action">#Name</a></li> #ENDLOOP </ul> #ENDLOCAL #LOCAL( "BatchMenu", "" ) #SET( "BatchMenu", #MENU_JSON("BatchActions", "Items", 1) ) <ul> #LOOP( #BatchMenu.Items ) <li><a href="#Action">#Name</a></li> #ENDLOOP </ul> #ENDLOCAL |
Input |
|