Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 11:21:29 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155538 Posts in 21715 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: show_menu2 question  (Read 630 times)
pieterb

Offline Offline

Posts: 46



« on: September 17, 2010, 09: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
mjm4842

Offline Offline

Posts: 227


« Reply #1 on: September 18, 2010, 05: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
pieterb

Offline Offline

Posts: 46



« Reply #2 on: September 19, 2010, 08: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
mjm4842

Offline Offline

Posts: 227


« Reply #3 on: September 19, 2010, 09: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
Hans

Offline Offline

Posts: 565


« Reply #4 on: September 19, 2010, 09:46:18 PM »

Hi Pieter
Maybe this:
Code:
<?php show_menu2(0SM2_ROOT+1SM2_START); ?>
?
And for the languages (hard coded with flags):
Code:
<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, 09:50:04 PM by Hans » Logged

Hans - Nijmegen - The Netherlands
pieterb

Offline Offline

Posts: 46



« Reply #5 on: September 20, 2010, 08: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
mjm4842

Offline Offline

Posts: 227


« Reply #6 on: September 21, 2010, 03: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
pieterb

Offline Offline

Posts: 46



« Reply #7 on: September 21, 2010, 02: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
mjm4842

Offline Offline

Posts: 227


« Reply #8 on: September 21, 2010, 03: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
pieterb

Offline Offline

Posts: 46



« Reply #9 on: September 22, 2010, 06:29:53 PM »

Sure.

For the language menu I have:
Code:
<?php show_menu2(0SM2_ROOTSM2_START); ?>

For the main menu I have:
Code:
<?php 
$nTreeRootId 
= (int) show_menu2(0SM2_CURRSM2_STARTSM2_CRUMB|SM2_BUFFER'[parent]''''''');
show_menu2(0$nTreeRootIdSM2_ROOT+1SM2_ALL); 
?>

Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!