Menu viewer | ||
---|---|---|
Previous | Next | |
Dimension viewer | HTML Viewer |
The figure below gives a quick overview of the models available when rendering a Menu Viewer using a template.
These are the global (top level) objects available when using FreeMarker with a menu viewer.
Object | Description | Type |
---|---|---|
component | This object contains information about the executing component. | ComponentModel |
context | This property contains information about the execution context. | ContextModel |
nodes | This property contains the top level nodes in the viewer. | MenuItemListMode |
viewer | This property contains information about the viewer. | ViewerModel |
This object contains information about the MenuViewer.
Property | Description | Type |
---|---|---|
portletTitle | The title of the portlet | String |
strings | Available strings for the viewer. This TextMapModel supports locations “template” and “domain”. | TextMapModel |
This object contains the top level nodes in the viewer, and is really just a collection of MenuItem objects.
The object is a freemarker sequence model, so you can access the nodes directly using
${nodes[index]}
, or you can traverse it using the
...[/#list]
syntax.
The object is also a freemarker node, so you can also use the built-ins ?children, ?parent, ?root, ?ancestors, ?node_name, ?node_type and ?node_namespace. The ?node_name and ?node_type properties are both “MenuItemList”.
This object contains information about a single menu item.
The object is a freemarker node, so you can also use the built-ins ?children, ?parent, ?root, ?ancestors, ?node_name, ?node_type and ?node_namespace.
Property | Description | Type |
---|---|---|
objectId | The ID of the node | Number |
objectGuid | The guid of the node | String |
level | The level of the node | Number |
label | The text of the node | String |
isActive | An indicator of whether this node is the “active” one. | Boolean |
hasActiveChild | An indicator of whether a sub-node of this one is the “active” one. | Boolean |
url | The url of the menu item destination, typically used in the href-attribute of an
<a> -tag.
|
String |
action | The action specification for the menu item | DimensionActionModel |
tooltip | The tooltip text of the menu item | String |
cssClass | The text of the css information specified on the menu item | String |
image | The name/path of the image specified on the menu item. Often, styling based on cssClass is a better choice. | String |
imageRollover | The name/path of the rollover image specified on the menu item. Often, styling based on cssClass is a better choice. | String |
isBreadcrumb | An indicator of whether this node is tagged with “breadcrumb” | Boolean |
isSitemap | An indicator of whether this node is tagged with “sitemap” | Boolean |
?children | List of children nodes | List of MenuItemModel |
?parent | Parent node | MenuItemModel |
?root | Root node | MenuItemModel |
?ancestors | List of ancestors | List of MenuItemModel |
?node_namespace | There is no namespace; it always returns null. | Null |
?node_type | Always the string “MenuItem” | String |
?node_name | Always the string “MenuItem” | String |
This object contains information about a single menu item action, typically a URL link.
Property | Description | Type |
---|---|---|
label | The label value of the action | String |
url | The URL of the action, used as the “href” attribute of the
<a> -tag.
|
String |
onclick | The value of the “onclick” attribute of the
<a> -tag.
|
String |
script | The value of the “onclick” attribute of the
<a> -tag.
|
String |
<default>
|
Formatted
<a> -tag representing the action.
|
(Any) |
Previous | Top | Next |
Dimension viewer | HTML Viewer |