Links into the header block

What is the best way to add links under the header? (I mean, just attached under the header, but into the html header block). If I insert the links in the Header, they are put on top. While if I put them in After Header, it puts them under but not inside the header block. Maybe there is a way to add links with javascript inside the header block? Thanks in advance!

2 Likes

If your simply looking to add links, there are some theme components that already accomplish this, such as:

Looking at the code these may give you a hint into accomplishing what you’re looking for, but in short, you would need to leverage Discourse’s pluginAPI to decorate an existing widget in the header, such as header-buttons:before and then you can use the virtual-dom to add anchor tags. Take a look at this guide for more information on that.

2 Likes