Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 12:28:02 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155536
Posts in
21712
Topics by
7736
Members
Latest Member:
chris85
WebsiteBaker Community Forum
English
Templates, Menus & Design
(Moderator:
Argos
)
Menu with one step without links
Pages: [
1
]
Go Down
Author
Topic: Menu with one step without links (Read 730 times)
viiksi
Offline
Posts: 5
Menu with one step without links
«
on:
October 19, 2010, 12:57:29 PM »
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
Logged
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: Menu with one step without links
«
Reply #1 on:
October 19, 2010, 01:07:44 PM »
You can use just sm2 for this.
See documentation and the topic on conditionals
Pseudocode:
[if level=n {nolink} else {link} ]
Regards,
Stefek
«
Last Edit: October 19, 2010, 01:09:52 PM by Stefek
»
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
viiksi
Offline
Posts: 5
Re: Menu with one step without links
«
Reply #2 on:
October 19, 2010, 01:22:31 PM »
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
Logged
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: Menu with one step without links
«
Reply #3 on:
October 19, 2010, 01:43:56 PM »
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
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
DarkViper
Development Team
Offline
Posts: 1252
Re: Menu with one step without links
«
Reply #4 on:
October 19, 2010, 02:03:03 PM »
Quote from: Stefek on October 19, 2010, 01:43:56 PM
...
$aItemOpen = '[if level=2 {<li>[menu_title]} else {<li>[a][menu_title]</a>}]',
...
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>}]',
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..
«
Last Edit: October 19, 2010, 02:06:30 PM by DarkViper
»
Logged
Anleitungen lesen und selber nachdenken ist anstrengend... Da lass ich doch lieber andere für mich denken...
In
1984
: Nineteen Eighty-Four is a unrealistic utopia!!
In
2012
: Nineteen Eighty-Four is a little piece only of our reality!!
viiksi
Offline
Posts: 5
Re: Menu with one step without links
«
Reply #5 on:
October 19, 2010, 02:13:55 PM »
Quote from: Stefek on October 19, 2010, 01:43:56 PM
it was just a "pseudo code".
I really have to confess that i had to use wikipedia even to check what "pseudo code" means
As you might notice now im not good at coding.
But yes now we are on right track.
I will bang my head to wall tonight to get this work.
ps. For this solution hardcoded works very well since its never going to be changed afterwards.
- viiksi
Logged
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: Menu with one step without links
«
Reply #6 on:
October 19, 2010, 02:18:53 PM »
Quote from: DarkViper on October 19, 2010, 02:03:03 PM
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.
Too confusing..
It's the same as using Keywords for unique titles in the menu
Quote from: DarkViper on October 19, 2010, 02:03:03 PM
ps @stefek:: compare by == instead of = then it works..
Of course, just on the fly, no testing..
Regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
viiksi
Offline
Posts: 5
Re: Menu with one step without links
«
Reply #7 on:
October 19, 2010, 10:24:29 PM »
Well thanks for you both.
I know finally understand what those false words even means on that code
It was good that you didnt tell me right solution straightaway so i had to think.
I had to do some modification to the code so it started to work.
Quote from: Stefek on October 19, 2010, 01:43:56 PM
...
$aItemOpen = '[if level=2 {<li>[menu_title]} else {<li>[a][menu_title]</a>}]',
...
to '[if(level=2) {<...
Logged
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: Menu with one step without links
«
Reply #8 on:
October 19, 2010, 10:37:17 PM »
Quote from: viiksi on October 19, 2010, 10:24:29 PM
It was good that you didnt tell me right solution straightaway so i had to think.
Yes great,
mostly like people using their own brains
Glad you got it working.
Regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
davidwaterman
Offline
Posts: 8
Re: Menu with one step without links
«
Reply #9 on:
February 16, 2011, 10:04:28 AM »
Hi Guy's I'm trying to do the same. But get code printing to the screen. Would you tell me what i'm doing wrong please?
<?php show_menu2(1, SM2_ROOT, SM2_ALL, SM2_ALL, '[iflevel=1{<li>[menu_title]}else{<li>[a][menu_title]</a>}]', "\n</li>", false, false, false, '<ul id="header_menu" class="menu">'); ?>
Thanks in advance.
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...