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


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


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 »
  • show_menu2 question
  • Print
Pages: [1]   Go Down

Author Topic: show_menu2 question  (Read 6346 times)

Offline pieterb

  • Posts: 46
  • Gender: Male
show_menu2 question
« on: September 17, 2010, 10:43:30 AM »
Hi everybody,

I'm working on a site where I have the following page structure:

NL
  Nieuws
  James
  Muziek
    Jimmy T & The Sizzling Hot Jazz Captains
    Behind Your Conversation
    18+
  Theater
    Onderwaterwereld
  Contact
EN
  Same as Dutch version

Now I would like to show the entire Dutch menu when the user is in the Dutch section. So including the third level elements. When the user is on the third level element, the menu should stay the same.

No matter what I try, I can't seem to get it to work. Can anyone point me in the right direction for the syntax for show_menu2?

Thanks so much in advance.
Logged

Offline mjm4842

  • Posts: 198
Re: show_menu2 question
« Reply #1 on: September 18, 2010, 06:54:23 AM »
Hi Pieterb,

Did you take a look at the examples on the demo page for show_menu2?

http://www.websitebakers.de/sm2/pages/enterprise.php

Best regards,

Michael
Logged
Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a

Offline pieterb

  • Posts: 46
  • Gender: Male
Re: show_menu2 question
« Reply #2 on: September 19, 2010, 09:19:20 AM »
Hi mjm4842,

Of course. But I couldn't find a solution to my specific menu problem. I've tried with if statements, with extra variables, etc, but I can't seem to get it to work.
Logged

Offline mjm4842

  • Posts: 198
Re: show_menu2 question
« Reply #3 on: September 19, 2010, 10:35:22 PM »
It would seem to me that you could accomplish this using two separate calls to the show_menu2 function. That way you could create different behavious for the English and for the Dutch menu. From the users perspective, it would look like a single menu.

With best regards,

Michael
Logged
Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a

Offline Hans

  • Posts: 914
  • Gender: Male
Re: show_menu2 question
« Reply #4 on: September 19, 2010, 10:46:18 PM »
Hi Pieter
Maybe this:
Code: [Select]
<?php show_menu2(0, SM2_ROOT+1, SM2_START); ?>?
And for the languages (hard coded with flags):
Code: [Select]
<ul><li><a href="http://www.xxxxxxxxxx.nl/web/nl/welkom.php"><img src="http://www.xxxxxxxxxxx.nl/media/flags/NL.png" alt="Nederlands" /></a></li><li><a href="http://www.xxxxxxxxx.nl/web/en/welcome.php"><img src="http://www.xxxxxxxxxxxxxs.nl/media/flags/EN.png" alt="English" /></a></li></ul>If not send a PM so that I can show you the code from a site that has Dutch and English implemented.
Hans

EDIT: Here's the site: http://www.trinityghanaprojects.nl/web/nl/welkom.php. Is this what you mean?
« Last Edit: September 19, 2010, 10:50:04 PM by Hans »
Logged
Hans - Nijmegen - The Netherlands

Offline pieterb

  • Posts: 46
  • Gender: Male
Re: show_menu2 question
« Reply #5 on: September 20, 2010, 09:16:30 AM »
Hi all,

This is not really the issue at hand. I do have a separate language menu (separate menu call), but what I want is that the rest of the entire menu is shown, based on that language.

You can check www.jameskeene.nl to see the current menu in action. Everything looks fine on the homepage and also everything is fine when you click any of the main menu items. But when you click one of the submenu items, only the submenu items are shown.
Logged

Offline mjm4842

  • Posts: 198
Re: show_menu2 question
« Reply #6 on: September 21, 2010, 04:19:52 AM »
Hi Pieterb,

If it is the full full menu that you want, why not just use the "Full" example (the very first one) at http://www.websitebakers.de/sm2/pages/enterprise.php ?

Either that or we are really not understanding what you are trying to achieve. Perhaps a visual example demonstrating the difference between what you have now and what you want would be helpful.

Best regards,

Michael
Logged
Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a

Offline pieterb

  • Posts: 46
  • Gender: Male
Re: show_menu2 question
« Reply #7 on: September 21, 2010, 03:42:50 PM »
Dear Michael,

With the full menu, you also see the NL / EN options in the menu. And that's not what I want.

If you take a look at the site (www.jameskeene.nl), you can see what I mean. The main menu on the left hand side is perfect. But when you click a submenu item (for example Behind your Conversation), the menu disappears and only shows the three submenu items from the current submenu. I would like to keep the menu that's displayed on the homepage.

Hope this clarifies things a bit. Thanks for thinking with me.
Logged

Offline mjm4842

  • Posts: 198
Re: show_menu2 question
« Reply #8 on: September 21, 2010, 04:54:53 PM »
Hi Pieterb,

I now see what you mean. I didn't realize that those were sub-menu items.

Can you post your show_menu2() line and related code for us?

Michael
Logged
Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a

Offline pieterb

  • Posts: 46
  • Gender: Male
Re: show_menu2 question
« Reply #9 on: September 22, 2010, 07:29:53 PM »
Sure.

For the language menu I have:
Code: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_START); ?>
For the main menu I have:
Code: [Select]
<?php 
$nTreeRootId 
= (int) show_menu2(0, SM2_CURR, SM2_START, SM2_CRUMB|SM2_BUFFER, &#39;[parent]&#39;, &#39;&#39;, &#39;&#39;, &#39;&#39;);
show_menu2(0, $nTreeRootId, SM2_ROOT+1, SM2_ALL); 
?>

Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2 question
 

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