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

Menu with one step without links

<< < (5/6) > >>

nibz:

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

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

--- End quote ---

Can happen to anyone ;)
There was an extra ' after {<li>[a][menu_title]</a>}]'
The code formatting of the forum pointed me to the right direction (your php closing tag was red instead of blue)

Hope with this correction daydreamer has what he/she is looking for.

jacobi22:

--- Quote from: nibz on February 14, 2014, 01:06:13 PM ---The code formatting of the forum pointed me to the right direction (your php closing tag was red instead of blue)

--- End quote ---

i copy the code from my project and change it here with daydreamers code from the top - one char to much  :roll:

p.s. thanks for repairing  :-D

daydreamer:
Thanks guys really appreciate this.

Now showing menu like this in my template

--- Code: ---" title="Home">Home
About
" title="About">About
Contact
" title="Contact">Contact
Why Us
" title="Why Us">Why Us
--- End code ---

and links like this

--- Code: ---http://localhost/%3Cli%3E%3Ca%20href=
--- End code ---

jacobi22:
its testet now  :oops:


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

maybe you dont need the automatic css-class in the li-Tag here <li class="[class]">
feel free to cut this to a simpla <li>

daydreamer:
Thanks so much for your help, works exactly as I need it with


--- Code: --- $aItemOpen      = '<li><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>',
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version