WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
However I have one question - is there a way to make a menu such that if that page has children, its children are displayed, and if you go to one of those children, that menu changes to show that pages siblings?
Oh! Also. I found it useful to hack your code so that it would recognise [nbsp] as a spacer in the menu code. Saves having to use those annoying | vertical slashes to seperate menus. Just thought I'd share.
#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 ul 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 ul li a.menu-current{ 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 ul li ul 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 ul li ul li a.menu-current{ 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;}
Issue 1If you are using the default format then the menu-current class is assigned to the <li> element, not the <a> element.Issue 2Sure this is correct? Pages available to registered users only will appear in the menu only to registered users.B
<?php show_menu2(); ?>
#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;}
<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>
if (($page['visibility'] == 'private' || $page['visibility'] == 'registered') && false === strstr(",{$page['viewing_groups']},", $currGroup)) { continue; }
if ($page['visibility'] == 'private' && false === strstr(",{$page['viewing_groups']},", $currGroup)) { continue; }