Class rowmenu

Description

A hierarchical menu renderer which does not use Javascript to implement the menuoption display. NB: this renderer is basically the same functionally as the treemenu but is rendered differently.

The menu is rendered in a table of 1 column x N rows. The top row contains all menu items of LEVEL 0, the second row contains items of LEVEL 1 and so on. Rows will only be rendered if the previous level has an EXPANDED heading menu option. So, at the start the menu is rendered with only the top level (LEVEL 0) items row displayed. If there are sub-menus, then one or more of these top items will be a "heading item" and clicking on it will reveal the next level of sub-menu items for which it is the parent. Items which are expanded or current location will be given the style defined by the ".hlmenuitem" class in sitestyle.css. All other menu styles are as defined in the '.menu" class. The menu status is saved/recovered from ax_wwwsession.menu_status and is therefore persistent.

Located in /rowmenu-defs.php (line 53)

RenderableObject
   |
   --treemenu
      |
      --rowmenu
Variable Summary
Method Summary
 rowmenu rowmenu ([string $id = "main"], [object $webpage = false], [mixed $stylesheet = ""], string $stylsheet)
 string html ()
 void set_background_colours (mixed $bgcolours, [mixed $delim = ","])
 void set_separator (string $sep)
Variables
Methods
Constructor rowmenu (line 67)

Constructor

Create a new menumaintainer.

rowmenu rowmenu ([string $id = "main"], [object $webpage = false], [mixed $stylesheet = ""], string $stylsheet)
  • string $id: Unique database menu identifier
  • object $webpage: Webpage object that this menu is being created for
  • string $stylsheet: Name of stylesheet file to reference for menu styles
html (line 133)

Render the menu as HTML.

  • return: The HTML
string html ()

Redefinition of:
treemenu::html()
Render the menu as HTML. Please note that the TreeMenu is by design a VERTICAL menu system, so don't expect the 'orientation' style in the stylesheet to have any effect for this class.
process_navigation (line 103)

Process any menu navigation.

This means we take note of any $_mid value which signifies a menu option of that ID is currently being focussed on and alter the menu configuration accordingly. We also look at the current page and compare that to the menu id 'action' to determine where we are and what we should be doing.

void process_navigation ()
set_background_colours (line 78)

Set backgrounds colours Sets the background colours for each menu level. Provide either a delimited list of colours in a string in #nnnnnn format, or an array of same. The first colour is for LEVEL 0, second LEVEL 1 etc.

void set_background_colours (mixed $bgcolours, [mixed $delim = ","])
  • mixed $bgcolours: List or array of background colours.
set_separator (line 91)

Set the separator string.

Sets the string which separates menu options as listed hozizontally across. This defaults to SEP_BAR (" | ").

void set_separator (string $sep)
  • string $sep: The separator string to use between menu options

Inherited Methods

Inherited From treemenu

 treemenu::treemenu()
 treemenu::get_styles()
 treemenu::html()
 treemenu::set_menu_images()

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3