Cnz_Html
[ class tree: Cnz_Html ] [ index: Cnz_Html ] [ all elements ]

Class: Cnz_Html_Menu

Source Location: /Html/Menu.php

Class Overview

Cnz_Html_Element
   |
   --Cnz_Html_Menu

HTML Menu class


Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods


Class Details

[line 129]
HTML Menu class

This class asserts that the most appropriate structure for a menu is an unordered list enclosed in a div.

Each configuration item value is of the form text,link. A blank item will cause a horizontal separator line to be created. For multiple blank lines, give each line a label, but no link value (e.g., LINE1:). If the text or link contains a colon, comma, or backslash, escape them with a backslash.

Example INI (defaults shown as comments):


 [HtmlMenuMain]
 list = "
         Home:/,
         About Us:/about/,
         Contact Us:/contact/,
         ,
         Careers:/career/,
         News:/news/,
         Citadel Network:http\://www.citadelnetwork.com/
 "
 

Example PHP:

  1.  Cnz_Html::loadAndDisplay('Cnz_Html_Menu'array('name' => 'main''config' => true'style' => true));

Example CSS:


 div.menu-main
 {
         background-color:       #FFE4E1;
         border-color:           inherit;
         border-style:           ridge;
         border-width:           0 0 3px 3px;
         color:                  inherit;
         clear:                  left;
         float:                  left;
         height:                 190px;
         margin:                 0;
         min-height:             400px;
         padding:                10px 0 0 0;
         width:                  134px;
 }
 ul.menu-main
 {
         font-family:            Helvetica,Helv,Arial,sans-serif;
         font-size:              small;
         font-weight:            bold;
         list-style-type:        none;
         margin:                 0;
         padding:                0 0 0 5px;
         text-align:             left;
 }
 li.menu-main
 {
 }
 a[href].menu-main
 {
         text-decoration:        none;
         background-color:       inherit;
         color:                  #901E78;
         font-weight:            normal;
 }
 a[href]:hover.menu-main
 {
         text-decoration:        underline;
         background-color:       inherit;
         color:                  #901E78;
         font-weight:            bold;
 }
 hr.menu-main
 {
         background-color:       inherit;
         color:                  black;
         margin:                 0;
         padding:                0;
 }
 

Note that this class can also be used for horizontal menus by setting display:inline for <li>. Setting white-space:nowrap for <ul> may also be desired for horizontal menus.




[ Top ]


Class Methods


constructor __construct [line 148]

Cnz_Html_Menu __construct( [ $options = array()])

Option fields: list Menu item list

Configuration fields: list Menu item list




Tags:

access:  public


Overrides Cnz_Html_Element::__construct() (Option fields:)

Parameters:

array   $options   Options

[ Top ]

method display [line 168]

void display( [string $style = NULL])



Tags:

access:  public


Overrides Cnz_Html_Element::display() (parent method not documented)

Parameters:

string   $style   Value for outermost style attribute

[ Top ]


Class Constants

HAS_CONFIG =  true

[line 131]


[ Top ]



Documentation generated on Thu, 19 Jul 2007 15:02:13 -0400 by phpDocumentor 1.4.0RC2