I Don't Want Anchor Tag On Item Using Menu Class

edited November 2013 in News & Announcements
Hello everyone.

I'm using the menu class to render my menu navigation for better control of each item. The only issue is that on one of the pages (or items), I want to keep the li tag but I don't want the anchor tag because it's the parent link and I don't want it clickable. I just want the sublinks to be active, not the parent link. But I want the parent link to still show.

Here's my script:

//menu navigation $nav = array(); $nav['home'] = array('label' => 'HOME', 'location' => '/'); $nav['about'] = 'ABOUT'; $nav['blog'] = 'BLOG'; $nav['artsjournals'] = array('label' => 'ARTSJOURNAL'); (THIS IS THE ONE I DON'T WANT THE ANCHOR TAG ON) $nav['artsjournals/submit'] = array('label' => 'Submit', 'parent_id' => 'artsjournals'); $nav['artsjournals/journals'] = array('label' => 'Journals', 'parent_id' => 'artsjournals'); $nav['gallery'] = 'GALLERY'; $nav['social'] = 'SOCIAL'; $nav['contact'] = 'CONTACT';

How can I do this?


  • edited 6:20AM
    Try setting this:
    $nav['artsjournals'] = array('label' => 'ARTSJOURNAL', 'location' => NULL);
Sign In or Register to comment.