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 »
  • SM2_ROOT misunderstanding?
  • Print
Pages: [1]   Go Down

Author Topic: SM2_ROOT misunderstanding?  (Read 3455 times)

Franck707070

  • Guest
SM2_ROOT misunderstanding?
« on: July 21, 2010, 07:15:43 PM »
Hi there,

I want to display a breadcrumb with show_menu2...

I want to display the current level and all parent levels only if the current level is not root. If the current level is root I want nothing to be displayed.

For example, if I have:

    * Home
    * Enterprise
          o Jams
    * Time
    * Oompa


So I want to see "Enterprise > Jams" if I am in Jam section. In all other main sections (like Home, Enterprise, Time and Oompa), I want nothing to be displayed. I thought the following would work... but unfortunately it doesn't.

<?php show_menu2(0, SM2_ROOT+1, SM2_CURR, SM2_CRUMB, '<span class="breadcrumb">&nbsp;&nbsp;>&nbsp;&nbsp;[a][menu_title]</a>', '</span>', '', '', '<span class="breadcrumb">[a][menu_title]</a>'); ?>

Is there a way to set show_menu2 parameters to achieve this?

Thanks
Franck

« Last Edit: July 21, 2010, 09:03:35 PM by Franck707070 »
Logged

Franck707070

  • Guest
Re: SM2_ROOT misunderstanding?
« Reply #1 on: July 22, 2010, 05:25:42 PM »
Got it, finally...

show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB,'<span class="breadcrumb">&nbsp;&nbsp;>&nbsp;&nbsp;[a][menu_title]</a>','</span>','','','[if (id!=current || level!=0){<span class="breadcrumb">[a][menu_title]</a>}]');

N.B.: (id!=current || level!=0) is the same as !(id==current && level==0)  Thx De Morgan!  :roll:

This is solved.
Logged

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

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