menu:get

Retrieves a menu from the menu manager. This tag looks up the menu name in the menu manager, and retrieves that menu. The menu is then made available as a scripting variable.

The name of the menu to retrieve is found using the following algorithm:

  1. The menuName section parameter of the section specified by sectionName and pubId. If the section does not exist, skip this item. If the section exists and has a menuName section parameter, the corresponding menu will be retrieved. If the section parameter is missing, or names a non-existent menu, no menu (null) will be returned.

  2. The menuName section parameter of the section specified by sectionId. If the section does not exist, skip this item. If the section exists and has a menuName section parameter, the corresponding menu will be retrieved. If the section parameter is missing, or names a non-existent menu, no menu (null) will be returned.

  3. The menuName attribute is the final fallback, if the previous sections don't exist. The menuName is simply the name of the menu in the menu manager, for the publication. If menuName is unspecified, or names a non-existent menu, no menu (null) will be returned.

Syntax
<menu:get
   id="..."
   menuName="..."?
   pubId="..."?
   sectionId="..."?
   sectionName="..."?>
   ...
</menu:get>
Attributes
id, mandatory, no runtime expressions

The name of the scripting variable to create, which will hold the menu.

menuName

The name of the menu to retrieve. The name of the menu can be specified directly by using the menuName attribute. This menu name must correspond exactly to the name of the menu. Menu names are case sensitive.

If sectionId or sectionName are specified and exist, then menuName will be ignored. menuName will only be used if the specified section ID or name doesn't exist, or if they aren't specified at all.

pubId

The id of the publication to get the menu from. This attribute should be used in conjunction with sectionName or menuName.

sectionId

The id of the section to get the menu from. The menu to use in a given section is defined in section.properties. Use this in combination with the section parameter called menuName. The specified section's menuName parameter will be used to figure out the name of the menu to retrieve.

If the attribute is not set, or the specified section does not exist, the tag will attempt to use the menuName to look up the menu directly, if specified.

sectionName

The unique name of the section to get the menu from. The menu to use in a given section is defined in section.properties. Use this in combination with the section parameter called menuName. The specified section's menuName parameter will be used to figure out the name of the menu to retrieve.

If the attribute is not set, or the specified section does not exist, the tag will attempt to use the sectionId to look up the section, if specified. The pubId attribute must be set to use this attribute.

Scripting variable (id)

A scripting variable will be defined using the value of the id attribute as its name. The variable is of type com.escenic.menu.Menu.