Menu

#635 Throw out the menu system for HTML_Menu

open
nobody
None
5
2006-07-18
2006-07-18
Dan
No

Currently, the look and feel of phpgedview is heavily
dominated by the menu system. In at least my firefox,
it looks... well, not so great!

Rather than using a custom menubar class and doing
everything that you currently do, why not consider
extending HTML_Menu
(http://pear.php.net/package/HTML_Menu)?

You can use javascript and css to transform the menu
into a dropdown affair without much sweat at all from a
skeleton of ULs and LIs.

You can still do all of your file_exists checks; and
you can still include images inline; as well as getting
a much neater and smaller lot of HTML.

See attached files; you'll need to do a

pear install HTML_Menu

and to get it working in Internet Explorer 6 or less
you'll need to use the csshover.htc workaround
(http://www.xs4all.nl/~peterned/csshover.html)

If you wanted to implement it, obviously, you'd split
this up into several files - css,
HTML_Menu_UnorderedListRenderer.php, toplinks.html,
MenuHelper.php to fetch the items.

Discussion

  • Dan

    Dan - 2006-07-18

    Example

     
  • Pauly

    Pauly - 2006-08-23

    Logged In: YES
    user_id=1153173

    Agreed, existing toplinks has too much embedded styling and
    tables and things, it could be a lot cleaner and easier to
    configure just with css.

     
  • John Finlay

    John Finlay - 2006-08-23

    Logged In: YES
    user_id=300048

    The current menu system has been heavily developed to work
    cross-browser and in the many languages that PGV supports.
    A CSS only menu system does not work fully cross-browser or
    in some languages, especially RTL languages.

    What CSS control do you want over the menus that you do not
    already have?

    Developement is currently being done on making the menu
    system more configurable so that admins can rearrange menu
    items or disable them.

    --John

     
  • Dan

    Dan - 2006-08-24

    Logged In: YES
    user_id=197121

    I want it to change from:
    http://svn.sourceforge.net/viewvc/\*checkout*/phpgedview/trunk/phpGedView/themes/ocean/toplinks.html?content-type=text%2Fplain

    To:

    $menu = new GEDMenuNavigationMenu();
    print $menu->render();

    And the output from attachment 2, examplemenu.html to
    something akin to attachment 3, examplemenu2.html

     
  • Dan

    Dan - 2006-08-24

    Example Menu 1 - Current output.

     
  • Dan

    Dan - 2006-08-24

    Simple, UL and LI menu

     
  • Pauly

    Pauly - 2006-08-24

    Logged In: YES
    user_id=1153173

    I might have missed something, I'm new to GedView but could
    the hardcoded styling (ie the line breaks and the images)
    not be removed from the php and put in place with just CSS?
    I'm not suggesting the functionality of the menus (the
    appearing and disappearing) be done just in CSS, I'm aware
    for some browsers the javascript is necessary, but even that
    could be separated out, see
    http://alistapart.com/articles/dropdowns/

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.