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

Menu with one step without links

<< < (4/6) > >>

daydreamer:
I'm no coder at all, I am using this in my template index.php


--- Code: ---<?php show_menu2(1, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_NUMCLASS|SM2_PRETTY, false, false); ?>
--- End code ---

jacobi22:
try this

shoes no Links in Level 2, only the menu_title
(remember , WB starts in LEVEL 0 (zero)


--- Code: ---<?php show_menu2(
                        $aMenu          = 1,
                        $aStart         = SM2_ROOT,
                        $aMaxLevel      = SM2_ALL,
                        $aOptions       = SM2_ALL|SM2_NUMCLASS|SM2_PRETTY,
                        $aItemOpen      = '<li class="[class]"><a href="[if (level=2) {<li>[menu_title]} else {<li>[a][menu_title]</a>}]'" title="[menu_title]">[menu_title]</a>',
                        $aItemClose     = '</li>',
                        $aMenuOpen      = '<ul>',
                        $aMenuClose     = '</ul>',
                        $aTopItemOpen   = false,
                        $aTopMenuOpen   = '<ul>'
        ); ?>
--- End code ---

if you need Level 0 or Level 1 without Links, change the Line $aItemOpen  at this point -> if (level=2)

daydreamer:
Thanks but that code is throwing an error

nibz:
I think the problem is a little typo.

Try this:

--- Code: ---<?php show_menu2(
                        $aMenu          = 1,
                        $aStart         = SM2_ROOT,
                        $aMaxLevel      = SM2_ALL,
                        $aOptions       = SM2_ALL|SM2_NUMCLASS|SM2_PRETTY,
                        $aItemOpen      = '<li class="[class]"><a href="[if (level=2) {<li>[menu_title]} else {<li>[a][menu_title]</a>}]" title="[menu_title]">[menu_title]</a>',
                        $aItemClose     = '</li>',
                        $aMenuOpen      = '<ul>',
                        $aMenuClose     = '</ul>',
                        $aTopItemOpen   = false,
                        $aTopMenuOpen   = '<ul>'
        ); ?>
--- End code ---

jacobi22:

--- Quote from: daydreamer on February 14, 2014, 11:38:28 AM ---Thanks but that code is throwing an error

--- End quote ---
sorry  :oops:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version