WebsiteBaker Support (2.8.x) > Templates, Menus & Design

show_menu2: valid XHTML and CSS selectable menus

<< < (19/64) > >>

brofield:
To use sm2 with UDM you need to read this page, http://www.udm4.com/manual/setup/list/

At the moment sm2 always adds the "menu-top" class to the top level menu item. According to the page above, this causes problems. sm2 needs to be changed so that if a top level open is supplied using $aTopMenuOpen parameter, then we just use that string verbatim and don't add the menu-top class. Seems a reasonable assumption that if the user specifies the top level open tag then they can add whatever classes they need without sm2 meddling in it.

With that change, UDM can be used by calling sm2 with

$aTopMenuOption = "<ul id='udm' class='udm'>"
$aItemClose = "</li>\n"

Cheers,
Brodie

virgil:
OK guys I'm back... I can't leave you alone for a couple of hours, can I?...  :roll:
... and you are overhelming me with information... Ill'try to digest it! :|


--- Quote ---(from Matthias)
"Sitemap v.2.8 supports the following informations wich you easily can use at the place you want."

"I like the show_menu2 because it is fast (only on database request) and flexible for all things that are needed."

(from Brodie)
"If you do want to use it then do the same as above replacing show_menu with
with show_menu2. To use sm2 with UDM see succhi's comment above.
http://forum.WebsiteBaker.org/index.php/topic,2584.msg20067.html#msg20067"

(from Succhi)
"You're quite right about the whole sitemap thing. [...]"
--- End quote ---

@Matthias Brodie Succhi

Thanks a lot for your advice... I will have a look at the standard sitemap 2.8...
if it meets my need,.... I will switch back to standard show_menu
and standard sitemap.

I believe Brodie's show_menu2 beiing great, but for me, with my
limited knowledge... the regular menu + sitemap are more easy handle...  :wink:
nevermind, thx to you all!  :-D

Cheers
Virgil

succhi:
Hi All, next update should help everyone.

@virgil
Please note the following change for showing all menus. The SM2_MULTIMENU no longer works. SM2_ALLMENU is now passed as the first parameter (not as a flag) which is usually the menu number you want. The menu is cached as usual.

@phil
By default you will have access to two css classes at the start and end of each group of siblings. If you have put item tags in (eg <li>, <span> etc) you will get class="menu-first" and class="menu-last" to fine tune layouts that depend on different beginnings and endings. You no longer need to pass the SM2_FIRSTLAST flag, it is now default

@virgil, melissa
There is a new flag that supresses topMenuOpen from getting class="menu-top" being added to it. The second from last parameter is $aTopMenuOpen and this is where you can specify what you want your topmost element to be e.g. <div id="my-id" class="my-class"> or <ul  id="my-id" class="my-class"> etc. It over-rules the $aMenuOpen tag for use at the very top. However to stop menu-top from being added to the class you need to pass a new flag SM2_TOPMENU. You can now pass SM2_TOPMENU as a flag along with "<ul id='udm' class='udm'>" (for $aTopMenuOpen) and get only that at the top.

The new update is 3.0b6
Please let me know if there are any problems. Documentation will follow later when Brodie is back on board.

Stuart



[gelöscht durch Administrator]

brofield:
Seems I have nothing better to do. Quick release of beta 7. See http://code.jellycan.com/show_menu2/
Doco updated. Flag for the top menu (SM2_TOPMENU) removed. If you supply a top menu item then it is used verbatim.
Should work with UDM4. Back to you Stuart...

B

brofield:
Final beta release before final release of 3.0

Following are the changes:
[ul]
[li]Argument list has had final change. Now uses itemOpen, itemClose, menuOpen, menuClose like existing show_menu.
[li]Classes are not added automatically to tags anymore. You must designate the tag to receive the class by adding the [class] keyword. Note that this is different to show_menu in that it doesn't add class="", only the class list. Therefore use something like, '<ul class="[class]">'.
[li]Added the [class] keyword, as well as [li] and [ul] for the standard item and menu open tags.
[li]Using UDM4 for the popup menu demo on the test site
[/ul]

See http://code.jellycan.com/show_menu2/ for download and readme file.

Note that version 3.0 of show_menu2 can be used by other functions to recurse through tree for them and make use of the cached data and single SQL query. See legacy.php file for examples of how this is done (call show_menu2 from inside your own function and supply your own formatter class).

If there are no bugs or changes required, this will be the 3.0 version.
Brodie

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version