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.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


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 »
  • show menu - instert static li
  • Print
Pages: [1]   Go Down

Author Topic: show menu - instert static li  (Read 3989 times)

c0de

  • Guest
show menu - instert static li
« on: March 16, 2010, 12:16:02 AM »
New Day new Problem xD

First i read the Documentian from show_menu its gives me an headache but now i knew what i can do all! Very HUGE Plugin!

My Problem is now i need a static <li> in my Menu which is right floated.

The best thing i get is:
Code: [Select]
<ul>
<?php show_menu2(1, SM2_ROOT, SM2_ALL, SM2_ALL,&#39;<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(
level==root){<li style="float:right;"><a href="&#39;.WB_URL.&#39;/pages/kontakt/biete-wohnung.php">&raquo; Biete Wohnung &laquo;</a></li> }]
       [if(class==
menu-last){</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->}]&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>

 </ul>

What gives me the li 2 times! And its shown on subitems also as first Item! (its an dropdown like in Multiflex 3)
I tried many several versions of this code but nothing works, the most trys shot my Template...

I think there is an foreach or something and becouse of this its shown more than ones, but why in the subitems?

Has please anybody an idea how to fix this?
I put an Image with the Problem as attachment!

Sincerly, c0de

[gelöscht durch Administrator]
« Last Edit: March 16, 2010, 12:18:40 AM by c0de »
Logged

Argos

  • Guest
Re: show menu - instert static li
« Reply #1 on: March 16, 2010, 01:23:41 PM »
If I understand the situation right, I would suggest you take the static li out of the showmenu2 call, and add it to the ul as such. So something like (not tested, will probably not work, but it's an idea):

Code: [Select]
<ul>
 <?php if(level==root){<li style="float:right;"><a href="&#39;.WB_URL.&#39;/pages/kontakt/biete-wohnung.php">&raquo; Biete Wohnung &laquo;</a></li> }
show_menu2(1, SM2_ROOT, SM2_ALL, SM2_ALL,&#39;<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]-->}]&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>

 </ul>
Logged

c0de

  • Guest
Re: show menu - instert static li
« Reply #2 on: March 16, 2010, 03:25:54 PM »
You Man are a WebsiteBaker God!

xD Rock on!
Logged

Argos

  • Guest
Re: show menu - instert static li
« Reply #3 on: March 16, 2010, 03:43:23 PM »
LOL Does it work?  :-D
Logged

c0de

  • Guest
Re: show menu - instert static li
« Reply #4 on: March 16, 2010, 06:22:01 PM »
What do you think? xD

So yes it works, without the if(level==root). But yeah it works perfect!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show menu - instert static li
 

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