[geeklog-devtalk] CSS Menu - Suggest we add to GL Common

Blaine Lang geeklog at langfamily.ca
Tue Mar 2 16:15:51 EST 2004


I have developed a new function for a dynamically created CSS menu.
It uses a configurable array for the menu items with template files and CSS
to allow customization.
Using horizontal lists, the html is pretty lean and there is no Javascript.

http://www.portalparts.com/menutest.php

An example of how to setup the top level menu. This would go in the language
file as I've used the array key as the label.

$navbarMenu = array(
'Main Page' => $_CONF['site_url'] .'/menutest.php',
'Site Admin' => $_CONF['site_url'] .'/menutest.php',
'User Admin' => $_CONF['site_url'] .'/menutest.php',
'Plugin 1' => $_CONF['site_url'] .'/menutest.php',
'Plugin 2' => $_CONF['site_url'] .'/menutest.php'
);

The function would be called like:

/* Call the Navbar with menu array, urlparms, and current selection */
echo ppNavbar($navbarMenu,$navparms,$menu,$navbarSubMenu[$menu],$submenu);

The second level menu is optional and would be defined like:
$navbarSubMenu[5] = array(
'Plugin Page1' => $_CONF['site_url'] .'/menutest.php',
'Plugin Page2' => $_CONF['site_url'] .'/menutest.php'
);
The above example defines the submenu for main menu item 5.

The CSS still needs some cleanup as I view it on Mozilla. It should be
possible to combine a Horizontal main menu with a vertical submenu.

I will be using this in my plugins and wanted to know if there is interest
to use this for menu's in geeklog or to make available to other plugin
developers.
I can certainly see areas of the GL Admin screens that could be broken up
better using a menu like this.

Cheers,
Blaine




More information about the geeklog-devtalk mailing list