WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • My sub menus are not displaying... Any suggestions....
  • Print
Pages: [1]   Go Down

Author Topic: My sub menus are not displaying... Any suggestions....  (Read 8318 times)

Offline twolf

  • Posts: 14
My sub menus are not displaying... Any suggestions....
« on: April 15, 2013, 02:25:46 AM »
I have tried various things and I am unable to get my sub menus to drop down on mouse over. 

Can I get some suggestions please?

http://peackcenter.org/wb

Thanks in advance for any help you can offer me....

T
Logged

Offline sky writer

  • Posts: 926
Re: My sub menus are not displaying... Any suggestions....
« Reply #1 on: April 15, 2013, 02:37:12 AM »
Link doesn't work.
Logged

Offline twolf

  • Posts: 14
Re: My sub menus are not displaying... Any suggestions....
« Reply #2 on: April 15, 2013, 03:06:32 AM »
Sorry bout that...

http://peakcenter.org/wb
Logged

Offline sky writer

  • Posts: 926
Re: My sub menus are not displaying... Any suggestions....
« Reply #3 on: April 15, 2013, 03:33:23 AM »
What's your show_menu2 code?
Logged

Offline twolf

  • Posts: 14
Re: My sub menus are not displaying... Any suggestions....
« Reply #4 on: April 15, 2013, 04:14:10 AM »
I had show_menu1 and it wasn't doing what it was supposed to so I tried 2....  I had 1 set the same....  According to the documentation with show_menu1 set the same I should be able to see all menus with drop downs correct??
Logged

Offline Re-Mi

  • Posts: 97
Re: My sub menus are not displaying... Any suggestions....
« Reply #5 on: April 17, 2013, 12:45:35 AM »
Hi maybe not the answer what you where looking for, but as i always had troubles with setting up the menu, i borrowed a little piece of code from a template (i'm really sorry i don't know the author)

put this somewhere between the head tags

Code: [Select]
<?php 
ob_start(); 
show_menu2(1, SM2_ROOT, SM2_ALL, SM2_ALL, '<li class="[class]"><a href="[url]" class="[class]"><span>[menu_title]</span></a>', "</li>", '<ul>', '<li class="ulend"></li></ul>', true, '<ul id="mobile" class="nav">');
$topmenu = ob_get_contents();
ob_end_clean();

ob_start(); 
show_menu2(1, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]">[a][menu_title]</a>', '</span>', '', '', '<b>'.$breadcrumbstart.'</b> <span class="[class]">[a][menu_title]</a>');
$breadcrumbs = ob_get_contents();
ob_end_clean();

$childpages = '';
if ($moredetails != '') {
ob_start(); 
show_menu2(1, SM2_CURR+1, SM2_CURR+1, '', '<li class="[class]">[a][menu_title]</a></li>', '', '', '', '');
$childpages = ob_get_contents();
ob_end_clean();
}

?>

and this where you want to show the menu

Code: [Select]
<?php echo $topmenu; ?>
this is the css part i use (this was/ is for one of my customers).., the menu works perfectly this way (for me)

Code: [Select]
.topmenubar {background-color:#4577a8; width:100%; clear:both;}

.childpages {width: 28%; margin:0 1% 0 1%; float:left; min-width:130px; margin-right:0%; font-size:0.9em;  background:#3f7539;}


.childpages ul, .childpages li {
list-style-type: none;
list-style-image: none;
margin: 0; padding: 0;
border-top: 1px solid #0c2109;
background: url(img/rightArrow.png) no-repeat 3px 6px;
}

.childpages li a {
display: block;
text-decoration: none;
font-weight: bold;
line-height:120%;
/*text-shadow: 1px 1px 1px #000;*/
padding: 8px 2px 8px 20px;
    color:#fff;

}


ul.nav {
list-style-type: none;
float: right;
margin: 0; padding: 0;
margin-top: 0px;
position: relative;
}

ul.nav li {
float: left;
list-style-type: none;
list-style-image: none;
position: relative;
font-weight: normal;
margin: 0; padding: 0;
/* border-left: 1px solid #fff; */
}
ul.nav li li {background:none;}

.nav li a {
display: block;
font-size: 18px;
text-decoration: none;
text-transform: uppercase;
line-height:100%;
/*text-shadow: 1px 1px 1px #000;*/
padding: 20px 17px 26px 17px;
    color:#fffff0;
}


/* Hover Formatting */
.nav  li a:hover, .nav li a:focus, .nav li a:active, .nav li a.active, .nav a.menu-current, .nav a.menu-parent {
/*background-color: #1c3d17;*/  color: #00acee;
}



/* 2 Ebene */
.nav li ul {
    display: none;
    width: 20em;
    margin: 0; padding:0px ;
    position: absolute;
}
.nav li ul li {
width: 20em;
text-align: left;
font-weight: normal;
margin: 0;
padding: 0;
/* border-top: 1px solid #3f7539; */
border-right: none;
background: #830000;
}
.nav li ul li a {
height: 24px;
font-size: 12px;
    font-weight: normal;
padding: 6px 15px 6px 15px;
   
}


/* 2 Ebene hover */
.nav li ul a:hover,  .nav li ul a.menu-current,  .nav li ul a.menu-parent  { color: #00acee;}


/* Show and hide */
.nav li:hover ul, .nav li a:focus ul {display: block; }
.nav li ul ul { display: none;}
.nav li:hover ul ul {display: none;}
.nav li:hover>ul, .nav  li li:hover>ul {display: block;  z-index: 1000;}


/* 3 Ebene  */
.nav li ul li ul {
margin: -20px 0 0 -90%;
padding:0;
z-index: 9999; 
display: none;
width: 14em;
}
.nav li ul li ul li {width: 14em;}




.nav li:hover {
z-index: 10000;
white-space: normal;

}

hope this will get you on your way again
Logged

Offline twolf

  • Posts: 14
Re: My sub menus are not displaying... Any suggestions....
« Reply #6 on: April 18, 2013, 04:07:09 PM »
Thanks...  I will give that a try....
Logged

Offline twolf

  • Posts: 14
Re: My sub menus are not displaying... Any suggestions....
« Reply #7 on: April 18, 2013, 04:08:53 PM »
Also....  The original template I am using I had to alter because I have been using a template for a while and with the new update installed on WB I am receiving an error on line 21 of this template....

The error is effecting the menu from displaying and If I remove the code at the top and the menu code within the error goes away.

I would like to be able to display the drop down menu the same way, but I am not sure how to achieve that in the new version of WB and I am not 100% certain the php error I am receiving.

Any guidance would be greatly appreciated...   I have attached the entire template that I am working with if anyone could help me this way.

T
Logged

jacobi22

  • Guest
Re: My sub menus are not displaying... Any suggestions....
« Reply #8 on: April 18, 2013, 04:24:03 PM »
Quote
receiving an error on line 21 of this template....

an error is this here in line 21 (from the index.php in the zip-file

Quote
SELECT page_id,menu_title,page_title,link,target,level,visibility$extra_sql

must be

Quote
SELECT page_id,menu_title,page_title,link,target,level,visibility,$extra_sql
Logged

Offline twolf

  • Posts: 14
Re: My sub menus are not displaying... Any suggestions....
« Reply #9 on: April 18, 2013, 11:58:15 PM »
Thanks... 

The below took care of my issues....  Thanks so much for your help....

Blessings...


I think you can fix this by just deleting
Code:

 AND $extra_where_sql

from the sql statement in line 21 of templates index.php.
So that line looks like:
Code:

   $query_menu = $database->query("SELECT page_id,menu_title,page_title,link,target,level,visibility$extra_sql FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND $menu_number ORDER BY position ASC");


Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • My sub menus are not displaying... Any suggestions....
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2