#18 change class for parent/child in plain menu

open
nobody
None
5
2004-09-13
2004-09-13
stakadush
No

this patch enables you to choose a different class for
parent & child items when using the plain menu module.
this way you can visually seperate parent's from
children...
another option is for defining how child items will be
pre-ed, if you don't want the default 6 spaces...

here's how to use the new patch (assuming you created a
new horizontal plain menu name $hpmid):

$hpmid->setParentClass('phplmbodytable');
$hpmid->setChildClass('childItem');
$hpmid->setChildPre('  >>');

so parent items will use the class phplmbodytable and
child items will use childItem..
also child items will be preceded by   >>

enjoy! :)

Discussion

  • stakadush
    stakadush
    2004-09-13

    Logged In: YES
    user_id=485615

    one more point:

    if you don't pass anything to any of these functions, but
    still call them, the default values will be reset, and they
    will be defined to nothing...

    useful, if for example, you don't want to print anything
    before child items..