XF 2.1 I want to add a tab to the far right by Search, for What's New

beerForo

Well-known member
What is the best way to do this? I either want it on the right of search, or before it.

I want it to be the "What's New" tab with the same functionality as the default one (which I would disable), and still configurable (if possible) from admin. Styled to fit the blue tabs of course, open when white for sub-nav flow. With the sub-nav still under it, it would just have to be right-aligned. (EDIT: I don't think I even need the sub-nav because it is a duplicate when on the WN tab.)

I would rename this to New Content and use the lightning bolt icon.

What is the best way to accomplish this? I imagine keep it enabled in admin, but disable by removing from template, move, style. Just need some help.

Thanks!
 
Last edited:
Okay keeping it simple, I don't even need the sub-nav when the What's New tab is activated, since it's an exact duplicate of the bar under it. So I just need to move the tab to the right! I can remove the sub-nav text in admin from the main tab, and remove button from template, and move it I guess. Correct? Any help appreciated thanks!

That duplicate menu always bothered me anyway. This makes a nice simple tab on the right to match the position of the mobile experience (lightning bolt).
 
Last edited:
This might be something to look into as I don't think you can move a tab into it:

 
Just so you know, what's new link is already there for mobile purposes, if you add this to your extra.less:

Code:
.p-nav .p-navgroup-link--whatsnew {
    display: block;
}

It'll always display it, I don't really see a need for an add-on to achieve this.
 
Just so you know, what's new link is already there for mobile purposes, if you add this to your extra.less:

Code:
.p-nav .p-navgroup-link--whatsnew {
    display: block;
}

It'll always display it, I don't really see a need for an add-on to achieve this.
Yeah, I achieved that before. I needed to edit the phrase to "" and it'd show up, but it just didn't fit there next to search:
193057

With the add-on more seamless integration:
193058
 
Come to think of it, the bolt should be next to search as it's searching for content (possibly other than yours) based upon certain, pre-defined, terms (newest posts, etc.).

Whereas mail/alerts are specifically for the user's content (i.e., their mail and alerts on their content).

However, it can be argued that "what's new" is searching for content new to that specific user too...

Maybe I'm thinking too much into it, but it does look better to the left.
 
Come to think of it, the bolt should be next to search as it's searching for content (possibly other than yours) based upon certain, pre-defined, terms (newest posts, etc.).

Whereas mail/alerts are specifically for the user's content (i.e., their mail and alerts on their content).

However, it can be argued that "what's new" is searching for content new to that specific user too...

Maybe I'm thinking too much into it, but it does look better to the left.

Still can be achieved without an add-on, this would hide the phrase but show the lightning bolt icon.

Code:
.p-nav .p-navgroup-link--whatsnew {
    display: block;
span { display: none; }
}

Or with the bolt icon connected to the alerts:

Code:
.p-navgroup.p-discovery
{
    margin-left: 0;
    background-color: transparent;
    a { background-color: @xf-publicHeaderAdjustColor; }
    .p-navgroup-link--whatsnew
    {
        display: block;
        margin-right: 5px;
        span { display: none; }
    }
}
 
Still can be achieved without an add-on, this would hide the phrase but show the lightning bolt icon.

Code:
.p-nav .p-navgroup-link--whatsnew {
    display: block;
span { display: none; }
}

Or with the bolt icon connected to the alerts:

Code:
.p-navgroup.p-discovery
{
    margin-left: 0;
    background-color: transparent;
    a { background-color: @xf-publicHeaderAdjustColor; }
    .p-navgroup-link--whatsnew
    {
        display: block;
        margin-right: 5px;
        span { display: none; }
    }
}

How would you swap the places of What's New and Search? (desktop and mobile) :D Thanks if you know.

Looking for the bolt on mobile, bolt with words on desktop, far right.
 
Back
Top Bottom