Hi,
See http://code.jellycan.com/show_menu2/ for details and updatesshow_menu2 is a code snippet that provides a complete replacement for show_menu.
FeaturesSpeedIt should be faster than the existing function as it hits the database exactly
once per
page load. The builtin function hits the database
multiple times per
function call. This is at the expense of more memory as all page information is stored locally. Realistically, the memory load is not large.
FlexibilityIt can generate menus in many different ways. Covering all of the existing menu's abilities (as far as I know) and adding a few more of it's own.
Valid XHTMLThe HTML generated by this function is valid XHTML.
Easy CSS stylingIt generates a menu with lots of classes on each element to allow easy styling of the menu via CSS. This should allow the generated menus to be used in pretty much any way, e.g. popups, dropdowns, etc. See websites about CSS menus.
Lists, Tables, Spans, or moreLike the existing function, you can use whatever HTML tag you want to delimit the menu and menu items. UL, OL, DIV, SPAN, TR, etc. Use your imagination.
Menus or BreadcrumbsAll types of menus can be generated as well as breadcrumbs.
DemoA demo website showing many of the different types of menus that can be created using this function is at
http://code.jellycan.com/sm2test/ DocumentationSee the website mentioned above for documentation.
DisadvantagesNo major disadvantages to using this menu function that I can see, although suggestions are welcome. Minor ones that I can think of are:
Call SignatureIt doesn't use the same call signature as show_menu (although it can if you want, just uncomment the include legacy.php line in the include.php file).
Multiple Class NamesIE for Mac has a number of bugs relating to multiple class names on a tag. Major browsers that people actually use will handle it fine though.