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.8 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 »
  • Showmenu2 vertical menu under specific page
  • Print
Pages: [1]   Go Down

Author Topic: Showmenu2 vertical menu under specific page  (Read 4426 times)

Offline netash

  • Posts: 14
Showmenu2 vertical menu under specific page
« on: February 17, 2012, 08:07:56 AM »
Hallo friends,

I have a multilang template with one menu shows in two ways:
1. normal dropdown menu.
2. side menu only for a part of the tree - products.

The tree looks like:
-EN
--Home
--About
--Products
---group1
----product1
----product2
---group2
----product3
----product4
-DE

My problem is with the side menu.
I am using this code:
Code: [Select]
<?php show_menu2(0, 75, SM2_CURR+1, SM2_ALL | SM2_TRIM, '<li><a href="[url]" class="[class]"><span>[menu_title]</span></a>', '</li>', '<ul class="ullev[level]">', '</ul>', false, false);?>75 is the page number of "Products" that the I want to show the menu items under.
When group1 is pressed, I want to see its childs - product 1 and 2, and group2 without its childs.
It is all working fine when I am in the "product" tree, but when I press "home" or "about", no items are shown in the side menu.

Please Help,
Thanks,
Netash
Logged

Offline mdemaree99

  • Posts: 102
Re: Showmenu2 vertical menu under specific page
« Reply #1 on: February 21, 2012, 08:52:04 PM »
Try this
Code: [Select]
show_menu2(0, SM2_ROOT+1,SM2_ALL , SM2_ALL|SM2_CURRTREE
I have never tried or seen an example of putting a page number as an option, so a little surprised it is working at all.  In your code...I looks like that when you click on Home.. The start would equal the aMaxLevel

show_menu2(
        $aMenu          = 0,
        $aStart         = SM2_ROOT,
        $aMaxLevel      = SM2_CURR+1,
        $aOptions       = SM2_TRIM,

I am doing a site like that that I have used 3 menus to help out.

Top: (Shows my Public and Member Section)  Would show different languages for you
show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL

Main:  Shows dropdown menu to all sites within my Public or Members section
show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_ALL|SM2_CURRTREE

Side Menu:  (shows one level down of sub pages.
show_menu2(0, SM2_CURR+2, SM2_CURR+2,SM2_ALL|SM2_CURRTREE

SM2_CURRTREE ensures I am not showing my public pages when I am in members.
Would not see members side in public unless user had already logged in.  Can make output pretty ugly.

examples page should help
http://www.websitebakers.de/sm2/pages/enterprise.php
Logged

Offline mdemaree99

  • Posts: 102
Re: Showmenu2 vertical menu under specific page
« Reply #2 on: February 22, 2012, 07:24:05 AM »
Also see another thread.
https://forum.WebsiteBaker.org/index.php/topic,22455.msg158715.html#msg158715

Are you 2 the same user??
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Showmenu2 vertical menu under specific page
 

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