1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Nav bar menu tabs not highlighting when on the page they are linked to

Discussion in 'Styling and Customization Questions' started by Noobstradamus, Jan 6, 2014.

  1. Noobstradamus

    Noobstradamus Member

    For some reason the new nav menu tabs I added are not highlighting when you click on them and take you to the page they are linked to. For example I have Forums Members "New Page" "NewPage" Help

    The Forums and Members tabs highlight just fine when I click on them, but the other tabs for my new pages do not highlight when you click on them and the page they are linked to is loaded. For example on Xenforo, http://xenforo.com/community/resources/ , The tab is highlighted showing you are on that page/section of the website. Or if you click on forums that tab is highlighted.

    The links I am using do not take you to a different website or anything but just a different page on the site. Is there some code that I am missing from these menus to make this happen?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. AndyB

    AndyB Well-Known Member

    Hi Paul,

    Could you show us how to create this simple add-on. Perhaps just post the PHP code.

    Thank you.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    If I get the chance I'll try and package it up into a generic add-on.
     
    jo8jo and AndyB like this.
  5. Noobstradamus

    Noobstradamus Member

    @Brogan thank you we would appreciate it!
     
  6. Noobstradamus

    Noobstradamus Member

    I have been playing around with the tab logic and code and there is no way I have found that I can get these tabs to highlight/be selected when I am on the page they are associated with. I even tried nodes as tabs and didn't get the behavior I want. I just want to be able to click on the new Tab I added and then it will remain highlighted/selected as long as I am on that page. Has anyone done this themselves without use of a plugin or something I can copy from current tabs such as Forums to get this tab selected behavior?
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    The add-on I linked to does that.
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yeah the Nodes As Tabs addon should work for you. Just add/edit a node and enable Display As Tab which adds it to the navbar and enables tab-selection. If that's not what you want then please provide more information.
     

Share This Page