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


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 »
  • Check if page had subpages, and then show a submenu
  • Print
Pages: [1]   Go Down

Author Topic: Check if page had subpages, and then show a submenu  (Read 6137 times)

Gerben de G.

  • Guest
Check if page had subpages, and then show a submenu
« on: August 05, 2008, 08:13:52 PM »
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
Logged

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: Check if page had subpages, and then show a submenu
« Reply #1 on: August 06, 2008, 02:19:39 AM »
Took you allredy a look at the show_menu2() function?

Stefek
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: Check if page had subpages, and then show a submenu
« Reply #2 on: August 06, 2008, 03:29:13 AM »
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
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Gerben de G.

  • Guest
Re: Check if page had subpages, and then show a submenu
« Reply #3 on: August 06, 2008, 04:27:54 PM »
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
« Last Edit: August 07, 2008, 12:14:57 PM by Gerben de G. »
Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: Check if page had subpages, and then show a submenu
« Reply #4 on: August 06, 2008, 04:38:56 PM »
Hi,
using SM2 is the easiest way to realize what you want:

For the main menu:
Code: [Select]
show_menu2(0, SM2_ROOT, ... other parameters depending on your needs)for the submenu:
Code: [Select]
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
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Gerben de G.

  • Guest
Re: Check if page had subpages, and then show a submenu
« Reply #5 on: August 20, 2008, 09:16:52 PM »
Little bit late, but it works.
Thanks!
Logged

rikkibr

  • Guest
Re: Check if page had subpages, and then show a submenu
« Reply #6 on: December 22, 2008, 05:42:28 PM »
Thanks Bernd  :-)

This solved my problem also.

Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Check if page had subpages, and then show a submenu
 

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