WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Menu, CSS, Droplet; childeren not showing CSS in menu properly
BartA:
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
jacobi22:
can you post your show_menu-Code from the Template index.php?
BartA:
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.' ';
jacobi22:
--- Quote from: 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>')
--- End quote ---
dont forget the closed font-Tag (</font>( behind the |
like
--- Code: ---show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF"> |</font> [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>');
--- End code ---
--- Quote from: BartA on April 15, 2012, 07:19:37 PM ---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.' ';
--- End quote ---
try to use this code for using the extra show_menu2-parameters like
--- Code: ---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.' ';
--- End code ---
or
--- Code: ---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.' ';
--- End code ---
DarkViper:
the same code, a little bit shorter:
--- Code: ---<?php
return show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL | SM2_CURRTREE | SM2_BUFFER, ... );
?>
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version