WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: BartA on April 10, 2012, 09:17:54 PM

Title: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: BartA on April 10, 2012, 09:17:54 PM
Hi all,

i'm having some troubles with the CSS of my menu (childeren menu), used as a droplet. I'm not shure what is causing this problem.

- The menu works fine, in the top-level pages,
- In the childern menu:

 The menu-expand, menu first is applied to the first two links, then two links with no CSS-class at all for some reason, and the last one has menu-last

I can't figure out why there is no CSS-class for those links.

Example is viewable on

http://89.18.178.164/~marein/pages/assortiment/wol.php (http://89.18.178.164/~marein/pages/assortiment/wol.php)
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: jacobi22 on April 10, 2012, 10:34:26 PM
can you post your show_menu-Code from the Template index.php?
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: BartA on April 15, 2012, 07:19:37 PM
here's my showmenu in the index.php, wich is working fine, as long as i'm in the parent level.

show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |  [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>')

the problem comes up after clicking a link in the menu ( in the droplet i made):

ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE);
$content = ob_get_contents();
ob_end_clean();
return $content.' ';
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: jacobi22 on April 15, 2012, 07:57:23 PM
here's my showmenu in the index.php, wich is working fine, as long as i'm in the parent level.

show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |  [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>')


dont forget the closed font-Tag (</font>( behind the |
like

Code: [Select]
show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |</font> [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>');
the problem comes up after clicking a link in the menu ( in the droplet i made):

ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE);
$content = ob_get_contents();
ob_end_clean();
return $content.' ';

try to use this code for using the extra show_menu2-parameters like

Code: [Select]
ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE, '<a href="[url]" class="[class]">[menu_title]</a>', '', '', '');)
$content = ob_get_contents();
ob_end_clean();
return $content.' ';

or

Code: [Select]
ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE,
          '<li class="[class]"><a href="[url]" class="[class] men">[menu_title]</a>', '</li>', '<ul class="submenu>', '</ul>');
$content = ob_get_contents();
ob_end_clean();
return $content.' ';
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: DarkViper on April 15, 2012, 10:58:33 PM
the same code, a little bit shorter:
Code: [Select]
<?php

return show_menu2(0SM2_CURR+1SM2_ALLSM2_ALL SM2_CURRTREE SM2_BUFFER, ... );

?>
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: jacobi22 on April 15, 2012, 11:43:48 PM
thx  :|
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: BartA on April 16, 2012, 07:34:19 PM
here's my showmenu in the index.php, wich is working fine, as long as i'm in the parent level.

show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |  [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>')


dont forget the closed font-Tag (</font>( behind the |
like

Code: [Select]
show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |</font> [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>');
the problem comes up after clicking a link in the menu ( in the droplet i made):

ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE);
$content = ob_get_contents();
ob_end_clean();
return $content.' ';

try to use this code for using the extra show_menu2-parameters like

Code: [Select]
ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE, '<a href="[url]" class="[class]">[menu_title]</a>', '', '', '');)
$content = ob_get_contents();
ob_end_clean();
return $content.' ';

or

Code: [Select]
ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE,
          '<li class="[class]"><a href="[url]" class="[class] men">[menu_title]</a>', '</li>', '<ul class="submenu>', '</ul>');
$content = ob_get_contents();
ob_end_clean();
return $content.' ';


thank your for your reply, but i guess the problem is not entirely clear. The normal showmenu2 is working fine, untill you are getting a level deeper:

this is the home page:

(http://www.reggestadshop.nl/parentlevel.gif)

this is the submenu
(http://www.reggestadshop.nl/submenu.gif)
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: jacobi22 on April 16, 2012, 07:57:15 PM
thats not a menu-problem in the main-menu, only css

change your css-part from

Code: [Select]
#menu, a.menu {
        position:relative;
        width:700px;
        height:28px;
        z-index:8;
        top: 154px;
        vertical-align: bottom;
        padding-left: 5px;
        font-family:Verdana, Arial, Helvetica, sans-serif;
        font-size: 15px;
        color:#FFFFFF;
        }

to

Code: [Select]
#menu a {
        position:relative;
        width:700px;
        height:28px;
        z-index:8;
        top: 154px;
        vertical-align: bottom;
        padding-left: 5px;
        font-family:Verdana, Arial, Helvetica, sans-serif;
        font-size: 15px;
        color:#FFFFFF;
        font-weight:bolder;
        text-decoration:none;
        }
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: BartA on April 16, 2012, 08:03:09 PM
that was simple, but i don't quite understand why it did work on the parent level.

thanks very much!
Title: Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
Post by: jacobi22 on April 16, 2012, 08:07:52 PM
in parent level the show_menu2 set css-classes for all menu-points, not so in the second level, the class for 'Cursussen' and 'Openingstijden' is (was) empty