WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
vyni:
But You declared exactly
.menu-expand menu-child {........} ???
And this effected something else?
I can´t believe. But however. So add a new, unique class to the menu, like button[sib], than declare button1 to button5, for each button separately.
$aItemOpen = '<li class="button[sib] [class]">[a][menu_title]</a>',
And don´t tell me the same.
bupaje:
Thank you. I confirmed that my first example does not work. Here is my current declaration
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE);
maybe something is wrong here?
Anyway I have tried to add a class as you suggested using the examples on the demo page but have not been successful yet. If it is not too much trouble can you tell me where I should add this code?
Thank you for taking the time to help.
vyni:
So try this:
<?php show_menu2(
$aMenu = 0,
$aStart = SM2_ROOT,
$aMaxLevel = SM2_START,
$aFlags = SM2_ALLINFO|SM2_PRETTY,
$aItemOpen = '<li class="[class] button[sib]"><a href="[url]" target="[target]" [if(level==0){class="topitem"}][if(level==1){class="subitem"}]>[menu_title]<span>»[description]</span>',
$aItemClose = '</a></li>',
$aMenuOpen = '<ul>',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = false
); ?>
Please note: I just changed to li-output. I use it with an div-output. So maybe there is a small error, I havn´t tried.
With this You get somthing like ...class="menu-sibling button3"...
You must declare classes for button1 to 5 or whatever You get - look in the source-code
regards
bupaje:
Ooooh, thanks! You da man. I see the button1 ...button5 etc. Should be able to do it now.
Can I ask one more question? Is it possible to use the page id somehow in show_menu so instead of [sib] I can use something like [pageid]? The button numbers assigned via sib may change as I add items correct? I figure if it is possible I'd like to use the page ids which won't change.
Thanks a million.
vyni:
Hmm, I havn´t tried yet - but maybe yes. But than You must use the SM2_ALLINFO - otherwise the page_id isn´t available.
Just check out the help-page for sm2 how to set sm2_allinfo.
regards from Himberg
uups - just saw it´s already set - so try a class like butt[page_id] - maybe it works.
Edit: Yes, just set something[page_id] and You get somthing11 or whatever the page_id is.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version