WebsiteBaker Support (2.8.x) > Templates, Menus & Design
How do you make the parent menu unclickable? <SOLVED>
tsb:
Is there away of making the "home" link remain clickable?
tsb:
I dont really have knowledge of php, does it use if and else?
'
* [if( level == 0 ){<a>[menu_title]</a>}else{<a href="[url]">[menu_title]</a>}]',
"\n</li>",
this works perfectly from stefek,
could I put a then in and name the page called home so that it remains clickable to the front page,
'
* [if( level == 0 ){<a>home</a>} then {<a href="[url]">[menu_title]</a>}]',
"\n</li>",
just not logical enough :-(
Stefek:
Hello,
php (as many other scriptng languages) uses if/else, of course.
But there is no "then" in PHP.
But you may use another /if/ in your menu call using the PageID.
See the Documentation of SM2 for details (you'll find inside the sm2 package/ZIP).
It would look like:
--- Code: ---<?php
[li][if(level == 0){<a>[menu_title]</a>} if(page_id == 777){<a>XXXX[menu_title]XXXX</a>}else{<a href="[url]">[menu_title]</a>}]
--- End code ---
replace 777 with your pageID.
replace XXXX with what ever fits your ideas.
Should work (no time to test).
Regards,
Stefek
tsb:
hey stefek, whats the xxxx for?do i put a web address in our is it the page name?
gonna try it out on the portable, cheers,
Stefek:
Hello,
I just marked the place where you should put you attention on.
Regards,
Stefek
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version