Defining the Menu and the Toolbar

In the menuBar.xml and toolBar.xml files, the menu and the toolbar of the Content Navigator are composed from individual menu items (beans). The items available are listed in the itemRegistry.xml file. Other content-specific menu items and buttons on the toolbar can be defined in the contentMenu.xml file (see Configuring Custom Commands). Take a look at this example from the menuBar.xml file:

<menu name="file">
  <title lang="en">File</title>
  <title lang="de">Datei</title>
  <group name="object" contexts="object, select.object">
    <group name="new">
      <title lang="en">New</title>
      <title lang="de">Neu</title>
      <title lang="fr">Nouveau</title>
      <item roles="admin">create_object_template</item>
    <item separated="true">import_file</item>
  <item contexts="bookmark">create_bookmark_folder</item>
  <group separated="true" name="search" contexts="*.object">
    <item contexts="object, select.object">search_objects</item>
    <!-- insert saved searches here-->
  <item contexts="object" separated="true">logout</item>

The definitions of the items on the toolbar is specified analogously. However, it does not include a hierarchy (submenu) because the toolbar has no subitems:

  <group name="object" contexts="object">
    <item roles="admin">import_file</item>
    <item separated="true">finish_tasks</item>
    <item separated="true">search_panel</item>
  <group name="edit" separated="true">
    <item contexts="object">paste_objects</item>
    <item contexts="bookmark">paste_bookmarks</item>
    <item contexts="object">delete_object</item>
    <item contexts="bookmark">delete_bookmarks</item>
  <group name="view" separated="true" roles="admin">
    <item contexts="object">browser_preview</item>
    <item contexts="object">browser_icons</item>
    <item contexts="object">preview</item>

Each item in a menu or in a toolbar refers to a bean in the beans element of itemRegistry.xml. For example


refers to the following item in itemRegistry.xml and includes it in the toolbar:

<bean id="about_nps"
  <property name="titles"><map>
    <entry key="de"><value>Über Infopark CMS Fiona</value></entry>
    <entry key="en"><value>About Infopark CMS Fiona</value></entry></map>
  <property name="subpage"><value>AboutNPS</value></property>
  <property name="selectionType"><value>none</value></property>
  <property name="dialogSize"><value>large</value></property>

The group element gives you the possibility to group elements together without making this grouping visible in the menu or toolbar. If the group contains a dividing line (separator), and none of the items it contains (see below) can be selected (due to restrictions), the group will be completely hidden, i. e. including the separator. This helps to avoid two adjacent separators (without menu items between them).

Furthermore, the group element can be used to restrict the visibility of the items it contains to particular Content Navigator pages. This can be achieved by means of the contexts attribute that can have the following values:

  • object: the items in this group are visible if a file has been selected in the main window of the Content Navigator.
  • bookmark: the elements in this group are visible if bookmarks are being edited in the Content Navigator.
  • select.object: the elements in the group are visible if a file is selected using the file selection dialog in the Content Navigator.
  • search.object: the elements in the group are visible if a file is being searched for on the search page.

Using the roles attribute, groups of menu commands as well as individual menu commands can be restricted to particular user interfaces. See also the gui.roles system configuration entry in the gui.xml file.

The properties of beans of the class have the following meaning.

  • titles determines the multi-language titles of dialog pages.
  • subpage determines the names of a dialog page.
  • selectionType determines the selection of files to which a menu command can be applied: none = globally (no file), single = a single file, extended = a list of files.
  • dialogSize determines the size of the dialog window. Permitted values are small, medium, and large.