WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Menu with one step without links
viiksi:
Hello,
Heres a little explaining.
root
-level1
-level1
---level2 (Not link)
-----level3
---level2 (Not link)
-----level3
-----level3
-level1
Heres what i have at the moment.
<?php show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_ALL, false,"\n</li>", false, false, false, '<ul id="header_menu" class="menu">'); ?>
In this i make links that starts from level1. (root level shows elsewhere)
What i want is Level2 to be only text and not linkable row but still should open Level3 onmouseover. And of course level3 should be links again ;)
Not sure if i explained this easy enough ;)
Could there be some css code that would make level2 not linking to that page.
- viiksi
Stefek:
You can use just sm2 for this.
See documentation and the topic on conditionals
Pseudocode: [if level=n {nolink} else {link} ]
Regards,
Stefek
viiksi:
Thanks for fast answer.
I read the documentation many times allready even before this ;)
But in that document there is no {nolink} option at all.
i still dont get it where in that line to put your code.
- viiksi
Stefek:
it was just a "pseudo code".
Please read the opic on conditionals, as I said before:
http://code.google.com/p/showmenu2/source/browse/tags/4.9/README.en.txt#463
What you'll need is something like
...
$aItemOpen = '[if level=2 {<li>[menu_title]} else {<li>[a][menu_title]</a>}]',
...
Regards,
Stefek
DarkViper:
--- Quote from: Stefek on October 19, 2010, 02:43:56 PM ---...
$aItemOpen = '[if level=2 {<li>[menu_title]} else {<li>[a][menu_title]</a>}]',
...
--- End quote ---
this solution is ok. But unfortunately hardcoded to a special level. Softcoded it can look like that:
--- Code: --- $aItemOpen =>> '[if target==_self {<li>[menu_title]} else {<li>[a][menu_title]</a>}]',
--- End code ---
it's a bit tricky use of Target. For 'normal' pages you can use the target '_top' for 'break frameset' and '_blank' for an external link. If you choose '_self' so the menu_title is displayed without a link.
ps @stefek:: compare by == instead of = then it works.. :wink:
Navigation
[0] Message Index
[#] Next page
Go to full version