WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
kweitzel:
Hi all, from what I know about WB, the table about the visibility settings above is correct. Therefor I added that table to the WIKI page "More on Pages". Thanks brodie for your work!
cheers
Klaus
learning:
Thanks for that Klaus (I feel rather silly that it was something I had missed :oops:), and yes thank you Brodie for your great work :-D
At the risk of embarrassing myself further, I am still having troubles with the 'current menu' issue. I did as suggested earlier, and I can now get the 'current' to display properly... almost! Problem I have is, when I click on a page that has child levels, all items show as current 'in the parent form' and then to click on a child level, it restores to how it should be layed out.
For instance if this is how it should display..
Item 1
Item 2 (current)
item 2a
item 2b
Item 3
But it displays like this
Item 1
Item 2 (current)
Item 2a (child of current, should be small and indented)
Item 2b (child of current, should be small and indented)
Item 3
When I click on a child, it all then restores to the proper display.
I have included my css, and the html from the view source of the page.
Menu Call
--- Code: ---<?php show_menu2(); ?>
--- End code ---
CSS
--- Code: ---#menu {
padding: 0;
margin: 0;
}
#menu a {
text-decoration: none;
display:block;
}
#menu ul {
padding: 0;
margin: 0;
list-style: none;
}
#menu li {
margin: 0;
padding: 0;
font-size: 11px;
font-family: Arial;
}
#menu li a {
margin-top: 8px;
padding: 0 28px;
height: 21px;
line-height: 21px;
font-weight: bold;
text-transform: uppercase;
border-top: 1px solid #AACCD5;
border-bottom: 1px solid #AACCD5;
background-image: url(li1a.gif);
background-position: 13px 5px;
background-repeat: no-repeat;
}
#menu li.menu-current a {
margin-top: 8px;
padding: 0 28px;
height: 21px;
line-height: 21px;
font-weight: bold;
text-transform: uppercase;
border-top: 1px solid #AACCD5;
border-bottom: 1px solid #AACCD5;
background-image: url(li1a-c1.gif);
background-position: 13px 5px;
background-repeat: no-repeat;
background-color: #FAF9D0;
}
#menu li li a {
margin-top: 0;
height:19px;
line-height: 19px;
font-weight:normal;
text-transform: capitalize;
background-image: url(li2.gif);
background-color: #DEECF0 ;
background-position: 13px 5px;
background-repeat: no-repeat;
border-top: 1px solid #EEF5F7;
border-bottom: 1px none #EEF5F7;
}
#menu li li.menu-current a {
margin-top: 0;
height: 19px;
line-height: 19px;
font-weight: normal;
text-transform: capitalize;
background-image: url(li2-c1.gif);
background-color: #FEF2B9;
background-position: 13px 5px;
background-repeat: no-repeat;
border-top: 1px solid #EEF5F7;
border-bottom: 1px none #EEF5F7;
}
--- End code ---
HTML view source
--- Code: ---<div id="menu">
<ul class="menu-top">
<li class="menu-sibling menu-first"><a href="#" target="_top">Home</a></li>
<li class="menu-expand menu-current"><a href="#" target="_top">Services</a>
<ul class="">
<li class="menu-child menu-first"><a href="#" target="_top">Pricing Guide</a></li>
<li class="menu-child menu-last"><a href="#" target="_top">Hosting Plans</a></li>
</ul></li>
<li class="menu-sibling"><a href="#" target="_top">Portfolio</a></li>
<li class="menu-expand menu-sibling"><a href="#" target="_top">About Us</a></li>
<li class="menu-sibling"><a href="#" target="_top">Contact Us</a></li>
<li class="menu-sibling"><a href="#" target="_top">Site Map</a></li>
<li class="menu-sibling menu-last"><a href="#" target="_top">Members</a></li>
</ul>
--- End code ---
Sorry to be a pain, I am not the worlds best at coding, infact I really have no idea at all, but I will try any and all combinations before calling for help. These are just the last ones tried and the result. I have tried other call menu options too.
Thanks again.
brofield:
Try changing the class to the <a> tag. Your CSS rules then apply to a.menu-current and don't cascade to the rest. Example:
itemOpen = '<li><a class="[class]" target="[target]" href="[url]">[menu_title]</a>'
In future, note that this thread is for discussion of the SM2 output and possible bugs, like your original post. Not for CSS problems.
B
learning:
oops... sorry. :oops:
Thanks for your response. I will try to nut through that and see how I go.
Cheers
*mods - Please feel free to move my previous post and reply if need be.
succhi:
@brofield. I am finding my registered pages showing in my menu even with login enabled (show_menu2-3.8).
update: Woops, they are supposed to show. I forgot the difference between registered and private is that registered appears in the menu but you must be logged in to view, private you don't see in the menu at all until you are logged in.
Please forget the rest of my post unless you want registered pages to not show in your menu.
The following alterations fixed my problem so they no longer show
From this:
--- Code: --- if (($page['visibility'] == 'private' || $page['visibility'] == 'registered')
&& false === strstr(",{$page['viewing_groups']},", $currGroup))
{
continue;
}
--- End code ---
To this:
--- Code: ---if ($page['visibility'] == 'private'
&& false === strstr(",{$page['viewing_groups']},", $currGroup))
{
continue;
}
--- End code ---
Stu.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version