Navigation descriptor (navigation.xml)
The navigation.xml consists of a <menu> element, which in turn can have many <entry> elements, representing subsequent entries that will be visible in the navigation portlet. Here are the possibilities of the form of the <entry> tag:
<entry foldable="boolean value" permission="role name"> <link type="type">Link definition</link> <display>Text to display in the portlet</display> <menu> (nested menu definition) </menu> </entry>
This is a standard entry definition. It will display the given link in the portlet, possibly with a submenu. A bried description of all the elements:
foldable="boolean value" - only relevant if the entry has a sub-menu, and when set to true (otherwise, you can remove this attribute). Will cause the sub-menu to be visible only when this entry is selected, or any of the items in the sub-menu.
permission="role name" - this entry should be shown in the portlet only, if the current user has the given role.
<link type="type">Link definition</link> - behavior of this depends of the type of link:
no type defined - then this should be a normal link, relative or absolute, it will be placed in the portlet without any changes
type="page" - a link to a portal page will be generated, with the given name
type="wiki" - a link to a wiki page with the given name will be generated
type="freezone" - a link to a global freezone page will be generated. The Link definition should be a path to a page in the global freezone directory (so for example: subdir/page.html).
<entry projects-menu="true" level="level-id" />
This will place a menu with projects listed from the given level. See ../members/projects.xml and ../members/levels.xml for more details. The actual projects displayed will depend on the permissions of the current user.
Since Labs 1.1
The navigation.xml consists of a <navigation> element, which in turn consists of many top-level <menu> elements. Each such top-level menu element should have two attributes:
level - indicates that this menu will be used for projects, which level matches the given one. There should be one menu with this attribute not set, which will be the main menu (when no project is selected). As the attribute value, you can use - this will match all levels.
jsp - name of a jsp file to use to render the menu. The jsp file should be in the same directory as the .xml file.
The <menu> element contains of many tags, which define entries which will appear in the menu.
Many of these tags have common attributes and behaviour:
display attribute - this should be the text that is to be shown in the menu.
permission attribute - a given entry will be displayed only if the currently loggen in user has the given role.
content attribute - this should be the text defining the link (varies between individual tags). If this attribute is not set, link definition will be taken from the tag body.
foldable attribute - if the given entry has a submenu, that it will be shown only when the entry is currently selected and this attribute is set to true (otherwise the menu will be always visible).
jsFoldable="boolean value" - only relevant if the entry has a sub-menu, and when set to true (otherwise, you can remove this attribute). Will cause the sub-menu to be visible only when the user clicks on the given entry. The submenu will become visible without a page reload - with the use of java script. This also means, that such entry can't be a link.
Here are the available tags:
<page> - creates a link to a portal page
<freezone> - creates a link to a freezone page (global in the main navigation.xml, project-specific if used in a project.xml, the same hold for other tags)
<separator /> - creates a separator
<project-menu> - currently selected project's menu (taken from the appropriate project.xml)
<projects-menu level="project level"> - a list of links to projects in a given level
<project-link /> - creates a link to a the currently selected project