show_menu2 help - active page with div ID

Stefek

Hello,

START doesn't mean ROOT or LEVEL 0, therefore it is correct  :wink:

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

kevyn

Ok well it appears that using SM2_CURR  (Current no children) isn't actually enough, and you have do add SM2_START to the maxlevel tag

It's a little confusing because it sounds like these both do the same thing, but after some more trial and error it turns out it works if you insert them both for some reason

Stefek

[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

kevyn

thanks for the help, but now I'd like a little more advice please...

I'm setting up my 2nd menu on the page, which I just want to display level2 menus - and I want my main 'top navigation' to just display level1 (parent) menus.

my page is located here: http://www.leamtechwebsitedesign.com/pages/menu.php

As you can see, I'm trying to design a site for a restaurant - I want to click 'menu' and have the list on the right displayed, which works ok, however whenever I click on any of the child items in the menu, they all display on the top navigation.

here is my code again:

top main navigation
<div class="navigation">
<?php 
show_menu2
        
$aMenu          0,
        
$aStart         SM2_ROOT,
        
$aMaxLevel      SM2_CURR,
        
$aOptions       SM2_TRIM,
        
$aItemOpen      '<a href="[url]"[if(class==menu-current) { id="active"}] > [menu_title]',
        
$aItemClose     '</a>',
        
$aMenuOpen      ' ',
        
$aMenuClose     ' ',
        
$aTopItemOpen   false,
        
$aTopMenuOpen   false
 );
      
?>




<div class="clearer"></div>

</div>


right side menu:


<ul id="pages">
<?php 
show_menu2
$aMenu          0,
$aStart         SM2_ROOT+1,
$aMaxLevel      SM2_CURR+1,
$aOptions       SM2_TRIM,
$aItemOpen      '<li><a href="[url]" > [menu_title]',
$aItemClose     '</a></li>',
$aMenuOpen      '',
$aMenuClose     '',
$aTopItemOpen   false,
$aTopMenuOpen   false
 );
?>

</ul>

<?php page_content(2); ?>

</div>


can anyone see where I'm going wrong? - again I'm a bit of a noob to wb and show_menu2 and I've tried to get my head around the documentation for showmenu2 but it leaves me a little confused after a lot of trial and error!

I hope this makes sense, and thanks :-)

Stefek

[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

kevyn

thank you so much  8-)

I did try the documentation, but couldn't figure out where I was going wrong!

Stefek

Hello,

just try this replacement in your sm2 call:

$aItemOpen  = '<a href="[url]"[if(class==menu-current) { id="active"}]> [menu_title]',

(insertion = red)

Hope this helps.

By the way, more about this topic can be found here:
http://code.google.com/p/showmenu2/source/browse/trunk/README.en.txt?r=31#455

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

kevyn

#1
Wondering if anyone can help me please...

here is the original structure of my html menu:

<div class="navigation">
   
   <a href="index.html" id="active">Item1</a>
   <a href="index.html">item2</a>
   <a href="index.html">item3</a>
   <a href="index.html">item4</a>


   <div class="clearer"></div>

</div>


and I would love to have the active page highlighted, but can't figure out how to get it to work :-(

Here is my current code:

<div class="navigation">
<?php 
                show_menu2

        
$aMenu          0,
        
$aStart         SM2_ROOT,
        
$aMaxLevel      SM2_CURR+1,
        
$aOptions       SM2_TRIM,
        
$aItemOpen      '<a href="[url]" > [menu_title]',
        
$aItemClose     '</a>',
        
$aMenuOpen      ' ',
        
$aMenuClose     ' ',
        
$aTopItemOpen   false,
        
$aTopMenuOpen   false
                 
);
                  
?>


   
   <div class="clearer"></div>

</div>


please can anyone help? Many thanks in advance! :-)

ps. I plan to have a 2nd menu added to my page at a later date - so any warnings how this could affect my current menu would be appreciated