Check if page had subpages, and then show a submenu

rikkibr



BerndJM

Hi,
using SM2 is the easiest way to realize what you want:

For the main menu:
show_menu2(0, SM2_ROOT, ... other parameters depending on your needs)
for the submenu:
show_menu2(0, SM2_ROOT+1, ... other parameters depending on your needs)
So the submenu is only visible if you are on a page with subpages.

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

Gerben de G.

#4
Ok, thanx for comments.

@BerndJM:
Som extra Information:
WB 2.7
Own template
at the moment i use show_menu().

Soon as possible i will take a look at show_menu2(). Maybe is that a good way.

Gerben

BerndJM

Hi Gerben,

don't worry about your English, the mine isn't better  :|

To answer your question, some details would be helpful:
- what WB version you use?
- what template you use / would like to use?
- what a menu-call is in this template: show_menu() - show_menu2() - a "hand-made" menu?

So the answer could be:
- take this or that parameter in your menu-call or
- change this or that code part in your template
- ...

You see: no "good" information == no "good" answers ;-)

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

Stefek

Took you allredy a look at the show_menu2() function?

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

Gerben de G.

I want to have a submenu on my website, but only on pages who really have subpages. How can i check this?

-BTW, sorry for my bad Enlgish