Alternative component (plugin?) to categories navbar

AI-generated summary

In a discussion about finding an alternative to the default category navbar, user stephtara seeks a component or plugin to customize the navigation bar with arbitrary links. ToddZ initially suggests the Custom Top Navigation Links theme component and the sidebar’s custom section feature. stephtara clarifies that the sidebar option affects all users globally unless configured specifically, which ToddZ confirms is possible for personal use.

stephtara notes that the top navigation links do not integrate with the existing Header Categories Navbar space. ToddZ suggests Custom Header Links for the very top of the page. Finally, NateDhaliwal provides a technical solution by forking the discourse-categories-navbar repository. He demonstrates how to modify the component’s code to inject arbitrary links alongside the category list, sharing a working example and configuration settings. stephtara expresses appreciation for the custom header links option, while Jagster asks about the sidebar’s mobile compatibility.

Hi everyone, sometime back somebody mentioned to me a component (or was it a plugin?) that would allow me to have more control over what is currently my category navbar. I unfortunately can’t for the life of me find it again (brain fail) :anxious_face_with_sweat::cry:. Help?

It was something that would allow me to have a horizontal menu bar for navigation but put in pretty much whatever I wanted, IIRC.

That might be Custom Top Navigation Links - Theme component - Discourse Meta.

Another cool navigation alternative is the sidebar “add custom section” button:

Thanks! That might very well be it.

That changes it for all users, not just for me

(ETA: the above was a question, question mark missing, apologies for any confusion)

Custom Top Navigation Links is always global, but sidebar custom sections can be personal with “Visible to everyone” unchecked. I have a whole sidebar section for myself:

As an admin do you see the same visibility option I do?

Sorry there was a question mark missing at the end of my last post… it wasn’t an affirmation, I wanted to be sure it would change things for everyone and not just me.

So it’s a good option if I can change things there for everyone!

So, I’ve checked out Custom Top Navigation Links and it’s not really what I was thinking about – it may, however, be what was shared with me previously (I’d made a mental note to check it… but hadn’t). This doesn’t apply to the top navbar space that Header Categories Navbar creates, and that I would like to keep.

Hm… I’d be surprised if there’s something that can mix arbitrary links in with Header Categories Navbar. :thinking:

Custom Header Links can add things to the very top, though.

ooh, that is not exactly what I thought it was, but it’s really useful!
Thanks :slight_smile:

Maybe I can do away with the category navbar (though I do like the idea…)

@ToddZ @stephtara I think you can, but you’d need to fork the component.

You might be able to get away with adding more links below the each block.


For example, I added a bunch of links before the category list:

Settings:

This looks like this:

image

Link to repo: GitHub - NateDhaliwal/discourse-categories-navbar: Shows a horizontally scrolling nav of categories in your Discourse site header · GitHub

Hope this helps!

Wanted to credit you with a Like… but also: :exploding_head:

Have you tried how the sidebar works for mobile users?