WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
brofield:
Updated to version 2.6
* bug fix for 2.5, drop in replacement
* fixed bug where multiple page menus were not working correctly. Now defaults the menu to 0 which will use the default menu for that page (as far as I can see). Passing 1 for $aMenu will continue to get the main menu.
* added more items to the template so that now you can customize the generated item more
* a little faster
* doesn't output the menu-N and menu-child-N classes by default. Optionally turn it on.
ruebenwurzel:
Hello,
tried your latest version (2.6) on different installations and got always the following error:
--- Code: ---Warning: array_keys() [function.array-keys]: The first argument should be an array in C:\Intranet\Apache2\htdocs\modules\show_menu2\include.php on line 123
Warning: Invalid argument supplied for foreach() in C:\Intranet\Apache2\htdocs\modules\show_menu2\include.php on line 123
--- End code ---
Until 2.5 all works very fine. You change the $aMenu, so i tried it with '0' and '1' and also tried without any arguments, always the same result. Whats going wrong?
Thanks for this great code snippet and for your help
Matthias
brofield:
Must've screwed something up. It works fine on my test installation, so if you can figure out what the menu structure is that causes the error then I would appreciate it. I won't get to it for a few days at least though as I am not where my computer is. In meantime I will downgrade the release.
Cheers,
Brodie
ruebenwurzel:
Hello,
So here a short description, hope its enough:
Have a page with only rootpages (now subpages) = Error on every page
Have a page with rootpages and subpages = Error only on pages without subpages
Matthias
brofield:
I don't see how this is different from http://riseup.co.nz/pages/flidget.php
It has no subpages, yet there is no error from it.
I changed the way show_menu2 determines the parent items of the current page from doing it manually to using the page_trail data that WB stores. This appears to be what is causing the problem. It appears that the page_trail data stored for your pages is not correct.
How old is your WB installation? How many times has it been updated? Do you understand the WB database enough to check the page_trail data and see if it is stored correctly? If there is a chance that some WB databases don't correctly store this info then I will change back to the old way.
Brodie
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version