WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Menu with one step without links

<< < (3/6) > >>

daydreamer:
I just can't seem to get this working.

I'm replacing


--- Code: ---$aItemOpen      = false,
--- End code ---

with


--- Code: ---$aItemOpen      = '[if level=2 {<li>[menu_title]} else {<li>[a][menu_title]</a>}]',
--- End code ---

But does not work. Am I doing something wrong?


Thanks

jacobi22:
missing the () arround the question  -> if (level=2)

--- Code: ---$aItemOpen      = '[if (level=2) {<li>[menu_title]} else {<li>[a][menu_title]</a>}]',
--- End code ---

daydreamer:
Thanks but still does nothing at all  :?

daydreamer:
Is it right adding it in modules/showmenu2.includes.php ?

jacobi22:

--- Quote from: daydreamer on February 13, 2014, 01:12:34 PM ---Is it right adding it in modules/showmenu2.includes.php ?

--- End quote ---
no, thats a part from the show_menu2() call in your template index.php

as eample from my actual project
this show_menu2 remove the URL and set only a #, if this menu point has subpages - [if(class==menu-expand)
and it set the class "down" for all menu points in the first level  [if(level=1){down}]



--- Code: ---<?php show_menu2(
                        $aMenu          = 1,
                        $aStart         = SM2_ROOT+1,
                        $aMaxLevel      = SM2_ALL,
                        $aOptions       = SM2_ALL|SM2_CURRTREE|SM2_PRETTY,
                        $aItemOpen      = '<li class="[class]"><a href="[if(class==menu-expand){#}][if(class!=menu-expand){[url]}]" class="[class] p[page_id] [if(level=1){down}]" title="[menu_title]">[menu_title]</a>',
                        $aItemClose     = '</li>',
                        $aMenuOpen      = '<ul>',
                        $aMenuClose     = '</ul>',
                        $aTopItemOpen   = false,
                        $aTopMenuOpen   = '<ul class="nav" id="dropline">'
        ); ?>
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version