Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 11:21:29 AM
1 Hour
1 Day
1 Week
1 Month
Forever
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
WebsiteBaker Community Forum
English
Templates, Menus & Design
(Moderator:
Argos
)
show_menu2 question
Pages: [
1
]
Go Down
Author
Topic: show_menu2 question (Read 630 times)
pieterb
Offline
Posts: 46
show_menu2 question
«
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
Posts: 227
Re: show_menu2 question
«
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
Posts: 46
Re: show_menu2 question
«
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
Posts: 227
Re: show_menu2 question
«
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
Posts: 565
Re: show_menu2 question
«
Reply #4 on:
September 19, 2010, 09:46:18 PM »
Hi Pieter
Maybe this:
Code:
<?php show_menu2
(
0
,
SM2_ROOT
+
1
,
SM2_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
Posts: 46
Re: show_menu2 question
«
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
Posts: 227
Re: show_menu2 question
«
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
Posts: 46
Re: show_menu2 question
«
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
Posts: 227
Re: show_menu2 question
«
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
Posts: 46
Re: show_menu2 question
«
Reply #9 on:
September 22, 2010, 06:29:53 PM »
Sure.
For the language menu I have:
Code:
<?php show_menu2
(
0
,
SM2_ROOT
,
SM2_START
);
?>
For the main menu I have:
Code:
<?php
$nTreeRootId
= (int)
show_menu2
(
0
,
SM2_CURR
,
SM2_START
,
SM2_CRUMB
|
SM2_BUFFER
,
'[parent]'
,
''
,
''
,
''
);
show_menu2
(
0
,
$nTreeRootId
,
SM2_ROOT
+
1
,
SM2_ALL
);
?>
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...