XF 2.0 Current sub navigation style

Mike

XenForo developer
Staff member
#2
As in things like "new posts" etc? Those are never tracked as selected -- just the top level section is.
 

Case

Well-known member
#10
A bit of a hack but you could use the [attribute] selectors. Each of the sub-navigation links have a [data-nav-id]

So you could add something like the following to extra.less to style the individual links...

Code:
[data-nav-id="whatsNewPosts"] {
  color: red !important;
}
If you wanted to style a link on a specific page then you could use the <body> [data-template]

Code:
[data-template="news_feed"] {
    [data-nav-id="whatsNewNewsFeed"] {
        color: red !important;
    }
}
eg. This makes the 'Your news feed' link red on this page: https://xenforo.com/community/whats-new/news-feed

Not sure if this would work for all the sub-navigation links. You would have to check.
 

Case

Well-known member
#12
The 2nd part could style a link on the current page but you would have to add the code for all the different pages.
 
Top