Enterprise Components




Cotsec Menus/Directory

Menus

Cotsec Menus/Directory enables menus such as the one on the left to be generated for a website. The menus are template driven and hierarchical to any given depth.

The structure of the menus is determined by the directory structure of the website itself. For example, if a directory has two sub-directories A and B, then two menu items would appear in the menu. The actual names that appear in the menu are determined by a menu definition XML file "menuitem.xml" that resides in the same directory with the index.html file for the topic.

An example menuitem.xml file is:

<menuitem name="forms"
  short-title="Cotsec Menus"
  description=""
  tooltip=""
  designer-comment="comment visible only in designer"
  order="4"
/>

  • Short-title is the visible title for the menu
  • Description is the longer description
  • Tooltip is for use within swing style menus
  • Order is the order of the menu when displaying (higher displays first)

If a website contains the following directories:

 

root      
  /subdir    
    /undersub (order: 10)
    /under2sub (order: 5)
  /subdir2    
    /undersubdir2  
      /underunder

if the short-title specified for each directory is the same name as the directory (for simplicities sake - this is not a requirement), then the menu structure that would be created is:

root
  subdir
    under2sub
    undersub
  subdir2
    undersubdir2
      underunder

-- This assumes that the order that was specified for under2sub was a lower number than the order specified for undersub.

Clickable links would be created (using the default style). The menu below has been inserted automatically . As directories are moved or menu names change the menus are updated in all locations where they are used.

<!-- BEGIN Cotsec Menu -->

<!-- END Cotsec Menu -->

Note well: All code between the insertion markers will be removed and replaced with the directory menu. The insertion markers themselves will be retained.

The templates for these menus are contained within the templates directory under the COTSEC_HOME/cotsec/templates/menus directory.