New Idea for HTML/Menu.php

From: Date: Fri, 14 Sep 2001 08:07:26 +0000
Subject: New Idea for HTML/Menu.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1907@lists.php.net to get a copy of this message
Hi, I have a suggestion for improving the Menu-class. I would like to have an opinion about it and also would like to know whether anyone knows about any other initiatives with the menu class. Because the class now has *no* markup, it could be an idea to give the possibility to output not as an HTML table, but as an array (which also has no markup). My suggestion would be, for example: Array ( [0] => Array ( [url] => / [title] => Home [level] => 0 [active] => 0 ) [1] => Array ( [url] => about/ [title] => About PEAR [level] => 0 [active] => 0 ) ) The reason behind this: 1. all menuitems have 4 properties: url, title, level, active 2. I want to give a different layout to: active/non-active items, items that are in different levels (for example: different font-sizes) 3. This allows users to build their own menu-maker, while still using the power of HTML/Menu.php It's of course relatively easy to generate a menu from the array in the 'old' style. (This is also important for backwards compatability). So, in short: this is a way to separate menudesign from the technical properties of menus. I think that this would make the class MUCH more powerful. What are your thoughts about the idea? In short: old: give menutype => give menuitems => generate HTML new: give menutype => give menuitems => generate array as proposed => use your own HTML-maker or generate HTML in the 'old' way Kind regards, Ronald van den Berg Internet Application Developer Auxilium Software Development The Netherlands

« previous php.pear.dev (#1907) next »