WebsiteBaker Support (2.8.x) > Templates, Menus & Design
New template: Multiflex-3
bueno:
Hi,
I'd like to use the multiflex-3 template in my wb 2.7 installation.
sublevels should be shown as dropdowns from the main navigation, but are placed at the same level. (checked in FF and safari on Mac).
The template produces the following code:
--- Code: ---<!-- A.3 HEADER BOTTOM -->
<div class="header-bottom">
<!-- Navigation Level 2 (Drop-down menus) -->
<div class="nav2">
<!-- Navigation item -->
<ul>
<li><a href="http://www.site.com" target="_top">Home
</a>
</li>
<li><a href="http://www.site.com/pages/contact.php" target="_top">Contact</a>
</li>
<li><a href="http://www.site.com/pages/gastenboek.php" target="_top">Gastenboek</a>
</li>
<li><a href="http://www.site.com/pages/nieuws.php" target="_top">Nieuws
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul>
</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--><li><a href="http://www.site.coml/pages/nieuws/nieuwsbrieven.php" target="_top">Nieuwsbrieven </a>
</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--> </ul>
</div>
</div>
--- End code ---
As u can see, the sublevel link (" nieuwsbrieven" ) is placed outside the corresponding <ul>.
Has anyone encountered the same problem, and found the solution?
Ik looked at the index.php, but I don't feel confident with this conditional statements in the show_menu2()-function (that's where the solution is, i think):
--- Code: --- <div class="header-bottom">
<!-- Navigation Level 2 (Drop-down menus) -->
<div class="nav2">
<!-- Navigation item -->
<ul>
<?php show_menu2(1, SM2_ROOT, SM2_ALL,SM2_ALL,'<li>[a][menu_title]
[if(class==menu-expand){<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul>}]
[if(class!=menu-expand){</a>}]
[if(class!=menu-last){</li>}]
[if(class==menu-last){</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->}]','','',''); ?>
</ul>
</div>
--- End code ---
Anyone any suggestions?
ruebenwurzel:
Hello,
had exactly the same problem on a project of mine. The issues is indeed the menu call. Couldn't solve it. At the moment i use this code here:
--- Code: ---<?php show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_CURRTREE, '<li><a href="[url]">[menu_title]</a>','</li>','<ul>','</ul>'); ?>
--- End code ---
This works for all browsers exept IE6. As IE6 is used from about 30% this is only a temporary solution. I tried to solve this <ul> issue in the original code with additional if statements btw. changed if statements but didn't get it to work. So if someone got's the solution i would like to have it too.
Matthias
Ruud:
Strange thing.
I have used this template for two sites. No problem there.
I have been compairing data from bruno and my call is exactly the same, except the output is fine.
My sites are still running on 2.6.7 though.
Could it be there are modifications in the 2.7 show_menu2?
Another idea I had was that there are hidden or previous deleted menuitems where SM2 thinks he needs to close an item. Didin't test that, just a brainwave :-)
Ruud
ruebenwurzel:
@RuudE
Using the original code looks good in the frontend in every browser but when you try to validiate the page you see what the issue is. The handling of <ul> for sublevels is wrong wich makes the page not valide independent from the fact that it seems to work.
Matthias
Ruud:
--- Quote from: ruebenwurzel on May 19, 2008, 11:23:52 AM ---Using the original code looks good in the frontend in every browser but when you try to validiate the page you see what the issue is.
--- End quote ---
Yes, I noticed that too. But I think with the IE hacks in it, it will never validate :-)
The problem bueno describes is that a submenu is displayed as e new top-menu.
Looking at his generated code the is one </li></ul> too many.
-- cut --
<li><a href="http://www.site.com/pages/nieuws.php" target="_top">Nieuws
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul>
</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--><li><a href="http://www.site.coml/pages/nieuws/nieuwsbrieven.php" target="_top">Nieuwsbrieven </a>
</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--> </ul>
---------
The second line generates a new IE6 <table> and a new <ul>
The next line closes that one directly (in red), creates the submenu and closes it again.
Thats strange behaviour.
Ruud
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version