Сyclic link

Hello. It would be nice if the menu item in which the user is currently located would not be active. This can be done somehow with the help of DJ-MegaMenu? Thankful in advance for the answer.
Tagged:

Comments

  • Hey Aleks!
    Just to be sure, you would like the menu item that is currently active NOT being marked as active?
  • No. I want to not be able to click on the menu item of the current page.
  • Hi Aleksius,

    you can achieve this with a simple css:
    .dj-megamenu li.current > a {
    pointer-events: none;
    cursor: default;
    }
    Best
    Szymon
  • Hello. Thanks for the answer. Can I somehow remove the link itself? I need the current menu item to become plain text.
  • You need to modify the file modules/mod_djmegamenu/tmpl/default_url.php and remove the link for an active menu item.

    You can use the following condition to determine if the item is active:
    if ($item->id == $active_id) { 
    // active item
    } else {
    // not active item
    }
    Best
    Szymon
  • Thank you very much.
Sign In or Register to comment.