show_menu2 show child from parent only

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

Ruud

3 cheers for show_menu2(). The best WB addition ever.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

sky writer

Thank you both for you time and talent.
Ruud, that worked perfectly.
I did read the the show_menu2 documentation, but wasn't skilled enough to work out the formatting of the string.
Cheers!

Ruud

There are conditional parameters possible in SM2.

Code (NOT tested) Select
<?php
show_menu2
(0SM2_CURR+1SM2_CURR+1SM2_CURRTREE"[if(level > 1){[li][a][menu_title]</a>}]","</li>");
?>


..that should generate items for menu level 2 and up.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

sky writer

Tried that one before.  I tried again, and it doesn't give the result I am after.

That shows "Scores" on the "Person 1" page, and the "Person 1 Scores" page itself.
It also shows all Person1,2,3,4,5 child "Scores" links on the "Person" page.

DarkViper

try this please....

<?php

show_menu2
(0SM2_ROOT+2SM2_START,  SM2_TRIM|SM2_CURRTREE|SM2_PRETTY'<li><a href="[urL]"...');

?>
[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

sky writer

I left one important detail out.  The menu structure is actually three deep.

That is, there is:
Home
Person
     - Person 1
              - Person 1 Scores
     - Person 2
              - Person 2 Scores

So, I only want to see the additional "Person 1 Scores" child link when I am on the parent of that link (Person 1).

show_menu2(0, SM2_CURR+1, SM2_CURR+1, etc....);
shows "Person 1" and "Person 2" links in the alternate position when I am on the "Person" page.  I don't want that.

Hope this is clearer now.

Ruud

If I understand the question correctly...  8-)

show_menu2(0, SM2_CURR+1, SM2_CURR+1, etc....);
This should only show children of the current page.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

sky writer

#1
I have a working menu structure

<?php show_menu2(1SM2_ROOTSM2_STARTSM2_TRIM|SM2_PRETTY,
'<li><a href="[url]" target="[target]">[menu_title]</a>''</li>''<ul class="personmenu">''</ul>'
falsefalse
); ?>


That looks like this:
Home
Person

The "Person" menu item has a child named "Scores".  Currently, when I click "Person", the "Scores" link appears below it's parent - "Person", which is fine.  But I also want the child "Scores" to appear in another location, when "Person" is clicked.  And here is the part I am really having trouble with...
When someone clicks this separate child "Scores" menu link, to open the "Scores" page, I want that separate "Scores" menu link to go away.  I can't seem to find a combination that will accomplish that.

I have tried everything I can find on: http://www.websitebakers.de/sm2/