===== BASIC DOCUMENTATION FOR TREEMENU CLASS =====
This class is designed as an easy to manage DHTML TreeMenu object. It is
and feeds on XML data based in menu.dtd (also included in the package).
This class is distributed on GNU GPL based license (see LICENSE)
The public interface for the class is formed by:
CONSTRUCTOR: Initialize the object
$file -> name for the xml file holding the menu definition
NOTES: The object is automatically created as $menu due to needing the object
prior to XML parsing. By default it points to menu.xml in the same directori
but this file settings can be changed with SetFile method.
SETTING THE SOURCE FILE: Changes the file settings to $file
$file -> new source file for the object
NOTES; This method must be called within the HEAD section of the page and it
will automatically inlcude browser.js and TreeMenu.js libraries. It will then
SHOWS THE MENU: It will show the menu in that point
2.- XML MENU FILES
A menu file is a small xml file conforming with MENU.DTD. Each file must
include at least a MENU element and an OPTION element.
MENU ELEMENT: Root element
<menu width="<W>" nodewidth="NW" style="S" target="T" indent="I"></menu>
W : Total width for the table containing the TreeMenu
NW : Width for the node cells (normally that of the node graphics)
S : Style to use on the menu texts
T : Window/Frame name target to the menu links
I : MAX Indentation (number of nested menus)
OPTION ELEMENT: Defines menu entries
<option length="<L>" url="<U>" value="<V>"></option>
L : Number of options in this entry (this node expands to L options)
U : Destination Link for the option (can be an expandable node or not)
V : Entry text to show in the menu
NOTES: Options can be nested, so multiple level menus can be achived (see
MENU ELEMENT indent details)
A base $menu object is created with the inclusion of the class file as it is
required by the XML Parser auxiliary functions.
those specified with the length argument are set to a given option.
This class looks for the js files in DOCUMENT_ROOT/js directory and looks for
images in DOCUMENT_ROOT/images/menuicon directory (a set of base node/line
graphics ships along the class).
4.- Future releases and WIP
Some work will be done so the PHP object can check and validate MENU data (i.e. missing options), but the class is fully usable as is.
5.- Contact information
Carlos Falo Hervás
C/Manila 54-56 Esc. A Ent. 4ª
08034 Barcelona Spain
Phone: +34 9 3 2063652
Fax: +34 9 3 2063689