WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
brofield:
--- Quote from: berndn on July 31, 2006, 01:24:48 PM ---I want to create this kind of list...
But all my tries lead to garbish :)
--- End quote ---
Please read the documentation at http://code.jellycan.com/show_menu2/ In any case, that looks pretty much like the default output. Exactly what are you trying to do that is different to the default? If you want the class="submenu" when the menu has sub-menus then you just need to change your code to expect the class "menu-expand" and there you have it. There is no easy way to get the name="submenu" added when there is a submenu without writing your own output function. See legacy.php in the sm2 zipfile download for an example of a custom output function.
--- Quote from: berndn on July 31, 2006, 01:24:48 PM ---Anyway to dump the show_menu2 output into an php array or is this to complicated :D
--- End quote ---
Again, have a look at writing your own custom output function if you really want it output as an array. I expect that you are looking to over-engineer the problem though. You just need to read the documentation better.
Give us a clear explanation of the problem and we might be able to help you.
Regards,
Brodie
berndn:
Thanks for the tips so far. I would need the name="submenu" for the javascript which is needed for Internet Explorer.
I looked into the legacy.php but I'm not sure how to use it. I enable the legacy.php with the include.
After I do this what has changed. Do I need to call show_menu2 with what parameters or what do I have to do ?
If you wish we can talk about this via email or pm instead of me asking silly question in this thread ;)
brofield:
Version 3.5 now available at http://code.jellycan.com/show_menu2/
* Added conditional formatting. Only add attributes, classes, tags, etc when specific conditions are met for that menu item, like if it has a particular class, if it has a particular level, etc. Ssee the documentation for complete details. Examples using the conditional formatting can be found at the demo site http://code.jellycan.com/sm2test/ (search for "Conditional")
* New flag SM2_PRETTY to output the menu HTML formatted with indents for ease of debugging
B
brofield:
A custom output class takes callbacks from the sm2 menu engine and formats that data for output. The legacy.php file defines a new function sm2_show_menu() which attempts to recreate the call signature of the show_menu() function using a custom output class. It is an example of how to call show_menu2 with a custom output class, not a final solution for you.
Instead use show_menu2 version 3.5 and use the conditional formatting. See the http://code.jellycan.com/sm2test/ website, "Conditional" for an example of what you want to do.
B
berndn:
Thanks a lot for your explanation. I wasn't sure that it was so easy to use the custom output filter in the version I used. Thanks for this :)
And thanks a lot for the new version. Will try it :-)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version