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.

Donate with PayPal buttonSpenden mit dem PayPal-Button

  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Show_menu2 - menuitem niet laten zien
  • Print
Pages: [1]   Go Down

Author Topic: Show_menu2 - menuitem niet laten zien  (Read 12357 times)

Offline mgeene

  • Posts: 148
Show_menu2 - menuitem niet laten zien
« on: July 03, 2017, 12:16:54 PM »
Hallo,

Ik heb een show_menu2 navigatie in een website gebruikt, maar ik wil 1 menuitem niet zichtbaar hebben in de navigatie.
Ik kan alleen de pagina niet in de backend op "niet zichtbaar" zetten, omdat er veel pagina's onder hangen die in een ander menu weer zichtbaar moeten zijn. Is dit te doen met show_menu2 d.m.v. id of zo?

Alvast bedankt voor je reactie.
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: Show_menu2 - menuitem niet laten zien
« Reply #1 on: July 03, 2017, 12:43:12 PM »
without details....
solution 1: set page visibility to hidden
if you need on a other place a submenu with the child of this hiddenpage, use the page-id of this hidden page in the show-menu-call like this (43 is the page-id of your hidden page)

Code: [Select]
<?php show_menu2(0, 43, SM2_ALL, SM2_ALL,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');?>

solution 2 - multiple menus
ckeck the info.php of the used frontend-template for a definition like this
Code: [Select]
$menu[1]  = 'top-main-menu';
$menu[2]  = 'sibebar';
$menu[3]  = 'footer"';
$menu[99] = 'none';
you need there minimum two definitions, a hidden menu "none" not included
if you have there a definition like this with multiple menus, you can select a non-standard menu in the page settings of this page and this page will not show'n in the main menu

example for the submenu with a new menu-id (2)
Code: [Select]
<?php show_menu2(2, SM2_ROOT, SM2_ALL, SM2_ALL,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');?>
Logged

Offline Hans

  • Posts: 914
  • Gender: Male
Re: Show_menu2 - menuitem niet laten zien
« Reply #2 on: July 03, 2017, 11:49:07 PM »
Not tested, but 1. sounds good.

I'll give it a try, I had this same question  as #mgeene for a  long time but used something like 2. 1. Looks good to, even better.  (Y)


Logged
Hans - Nijmegen - The Netherlands

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: Show_menu2 - menuitem niet laten zien
« Reply #3 on: July 04, 2017, 12:56:39 AM »
additional tip for the work with multiple menu's (my solution 2)
example:

EN
--page EN 1
----Page EN 1.1
----Page EN 1.2

DE
--page DE 1
----Page DE 1.1
----Page DE 1.2

its not possible, to show parts of the english tree, if you stay on the DE-Pages (and vice versa). its not possible, to come out of this (language)-tree and show also parts of another (language)-tree. show_menu2 goes only downwards to the root parent of the called page with the same language like the called page. It is not suitable if you use several languages
multiple menus like my solution 2 works fine, if you show only pages with one languages in a submenu somewhere on the page and its better like solution 1, because solution 1 has a hard-coded Start-ID (43 in my example)

Solution 1 is a permanent menu, it show's the menu everytime (like a footer-menu), doesnt matter, which level and which parent. if you want to show the submenu only if you stay on the selected parent page, use SM2_CURR instead of the Page-ID.
to make solution 1 flexible for multilingual projects, you need a switch like this ( with a show-menu-call to a special Page-ID for every used language, here NL, DE and EN as System-Language - System-Language (or DEFAULT-LANGUAGE) is the Language in the WB-Settings and the Start-language, if you visit this project the first time without a language-select, because of that, the Default-Language stay in the else-part of this switch)

<?php 
if (LANGUAGE=="NL") {
  
show_menu2(0, 43, SM2_ALL, SM2_ALL,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');
} elseif (
LANGUAGE=="DE") {
  
show_menu2(0, 99, SM2_ALL, SM2_ALL,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');
} else (
LANGUAGE=="EN") {
  
show_menu2(0, 1, SM2_ALL, SM2_ALL,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');
}
?>


See also the post from James here -> https://forum.WebsiteBaker.org/index.php/topic,29130.msg204929.html#msg204929
Logged

Offline mgeene

  • Posts: 148
Re: Show_menu2 - menuitem niet laten zien
« Reply #4 on: July 10, 2017, 01:11:38 PM »
Thanks for your repley,
ik will take a look at it and let you know.

Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Show_menu2 - menuitem niet laten zien
 

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