WebsiteBaker Community Forum
WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Franck707070 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"> > [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
-
Got it, finally...
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB,'<span class="breadcrumb"> > [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.