Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 06:04:02 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149621 Posts in 21098 Topics by 7537 Members
Latest Member: lotte2
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: show menu - instert static li  (Read 656 times)
c0de

Offline Offline

Posts: 16


« 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:
<ul>
<?php show_menu2(1SM2_ROOTSM2_ALLSM2_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(level==root){<li style="float:right;"><a href="'
.WB_URL.'/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]-->}]'
,'','',''); ?>

 </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
« Last Edit: March 16, 2010, 12:18:40 AM by c0de » Logged
Argos
Moderator
**
Offline Offline

Posts: 2084


WWW
« 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:
<ul>
 <?php if(level==root){<li style="float:right;"><a href="'.WB_URL.'/pages/kontakt/biete-wohnung.php">&raquoBiete Wohnung &laquo;</a></li> }
show_menu2(1SM2_ROOTSM2_ALLSM2_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>
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
c0de

Offline Offline

Posts: 16


« Reply #2 on: March 16, 2010, 03:25:54 PM »

You Man are a WebsiteBaker God!

xD Rock on!
Logged
Argos
Moderator
**
Offline Offline

Posts: 2084


WWW
« Reply #3 on: March 16, 2010, 03:43:23 PM »

LOL Does it work?  grin
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
c0de

Offline Offline

Posts: 16


« 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
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!