RE:: Re: [PEAR-DEV] New Idea for HTML/Menu.php
| From: | Ronald van den Berg | Date: | Fri, 14 Sep 2001 17:35:39 +0000 |
| Subject: | RE:: Re: [PEAR-DEV] New Idea for HTML/Menu.php | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-1921@lists.php.net to get a copy of this message | ||
I've checked that URL.
My problem is, that my need goes further than the current possibilities of the menu class. At this
time, it's only possible to change the appearance of the menu by altering the class itself AND
it's not very easy to change the appearance per level. (I'd like a different font-size and
color for every level).
As you mentioned: why use my algorithm when the class already does it all for me. There's a
simple answer to that: I don't use a new algorithm, but I split the current algorithm in the
true algorithm part (which is very strong) and the markup part (which is, according to me, very
weak). In that way I can choose to use my own markup algorithm.
I think it's easier to understand what I mean, when I give a code example. So I will edit the
class for 2 menutypes, so that you can understand exactly what I mean.
Kind regards,
Ronald van den Berg
Auxilium SD
--Oorspronkelijk Bericht--
Van: "Tomas V.V.Cox" <cox@idecnet.com>
Aan: Ronald van den Berg <vandenberg@auxilium-sd.nl>,pear-dev@lists.php.net
Verzenden: 07:07
Onderwerp: Re: [PEAR-DEV] New Idea for HTML/Menu.php
On Friday 14 September 2001 10:07, Ronald van den Berg wrote:
> Hi,
>
> 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
>
If you check the url:
http://www.ulf-wendel.de/projekte/menu/tutorial.php,
you
will see how
you could change the appereance/style from the original one. I don't
see many advantages returning an array that should be parsed and drawn
with your own tree algorithm, when the class yet do it for you. If I
would need to do all this work by hand, why would I ever need the
class? :-) You could also benefit of css styles to easily change the
appereance.
My wish for the class would be to simplify the menu_array format, to
make it more similar to a tree structure.
[id] => array(
'url' =>,
'childs' => array(...)
)
Tomas V.V.Cox