Author Topic: How do you make the parent menu unclickable? <SOLVED>  (Read 22511 times)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: How do you make the parent menu unclickable? <SOLVED>
« Reply #25 on: December 03, 2013, 06:41:01 PM »
Stefek, just getting errors, if I can get this to work, I definitely will put some money towards your way.

Hello,
if you really want to spent some bucks, then I always love to get PHP Books in exchange for my time ;-)
Amazon makes it possible.

But first, let's try to get the menu to work.

The following code should work properly:
Code: [Select]
<?php    
    show_menu2
(
        
0,SM2_ROOTSM2_ALLSM2_ALL
        
'[li]
        [if(level != 0 || id == 777){ 
        <a href="[url]">[menu_title]</a>
        }                     
        else{
        <a>[menu_title]</a>
        }]'

        
'</li>'
        
false
        
false
        
false
        
'<ul id="header_menu" class="menu">'
    
);         
?>

Please try it, and let me know how it works.

You will need to replace 777 by the pageID of 'home'.

Kind regards,
Stefek



Hi

I would like to achieve this also and was wondering if it is possible to add more id's to level !=0 than just home page. Or at least all id's clickable, but one!

Thank you

R.
« Last Edit: December 03, 2013, 06:45:10 PM by Roych »

 

postern-length