# Allowing Admins to place arbitrary links in topnav

**URL:** https://meta.discourse.org/t/allowing-admins-to-place-arbitrary-links-in-topnav/58264
**Category:** Feature
**Created:** [Março 3, 2017, 12:41am UTC](https://meta.discourse.org/t/allowing-admins-to-place-arbitrary-links-in-topnav/58264 "2017-03-03T00:41:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [Março 3, 2017, 12:41am UTC](https://meta.discourse.org/t/allowing-admins-to-place-arbitrary-links-in-topnav/58264/1 "2017-03-03T00:41:16Z")

</div>

Requests for admins to be able to add links to the topnav come up reasonably often here on Meta.

There’s this one:

> [@Why we can't add groups to top menu](https://meta.discourse.org/t/why-we-cant-add-groups-to-top-menu/54968):
>
> Is there a way to add groups to top menu ? My /admin/site\_settings/category/basic top\_menu settings looks like But I do not get Groups at top menu. I’ll love to add grop page to top menu so users can join freely My Discourse is at v1.7.0.beta10 +149 Version

There’s also this one, with discussion spanning 3 years!  
[https://meta.discourse.org/t/how-to-add-external-link-on-top-menu/9508?u=jomaxro](https://meta.discourse.org/t/how-to-add-external-link-on-top-menu/9508)

Back in 2015, Jeff said:

> [@What about adding tags in the top menu?](https://meta.discourse.org/t/what-about-adding-tags-in-the-top-menu/25501/10):
>
> I have said for a long time .. it’s criminal that we don’t **allow admins to place arbitrary links in topnav.**
> 
> That would solve this and many more issues.

Sam responded:

> [@What about adding tags in the top menu?](https://meta.discourse.org/t/what-about-adding-tags-in-the-top-menu/25501/11):
>
> Adding the links is the easy part, the hard part is maintaining the breadcrumb. If we allowed admins to add “Tags” or “Users” there we also need to allow to carry the top nav around and keep it highlighted.

At the moment, the solution for this issue seems to be adding custom JS to the `</body>`. While this works, it’s not exactly user friendly (you need a basic JS understanding to add or change links), and could break at any time with a code change to Discourse.

I’d like to suggest the following 3-stage rollout:

1. Provide a site setting for admins to add _external_ links to the topnav. The site setting will need 3 values, I propose a comma separated list. `title,tooltip,URL`
2. Provide a site setting for admins to add _internal_ links to the topnav - without handling breadcrumbs.
3. Improvinate #2 by handling certain cases where breadcrumbs make sense, like Tags, Users, Groups, Badges, etc.

The benefit to the 3-stage rollout is that _external_ links require no routing by Discourse, nor breadcrumb support. They should simply be an `href`. Keeping steps 2 & 3 separate will allow for complaint driven development. Roll-out internal link support, see if there are complaints about the lack of breadcrumbs. Meta already has 2 internal links without breadcrumb support, and I’ve never seen a complaint.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [Março 3, 2017, 12:51am UTC](https://meta.discourse.org/t/allowing-admins-to-place-arbitrary-links-in-topnav/58264/2 "2017-03-03T00:51:45Z")

</div>

Isn’t this what this plugin is trying to solve?  
[https://meta.discourse.org/t/navigation-add-custom-menu-items/53124](https://meta.discourse.org/t/navigation-add-custom-menu-items/53124)

Or are you referring to an actual header?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [Março 3, 2017, 12:53am UTC](https://meta.discourse.org/t/allowing-admins-to-place-arbitrary-links-in-topnav/58264/3 "2017-03-03T00:53:04Z")

</div>

> [@cpradio](#):
>
> Isn’t this what this plugin is trying to solve?

Yes, that’s exactly it - but that’s a plugin, so it’s a no-go on hosted sites.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [Março 3, 2017, 12:54am UTC](https://meta.discourse.org/t/allowing-admins-to-place-arbitrary-links-in-topnav/58264/4 "2017-03-03T00:54:03Z")

</div>

> [@jomaxro](#):
>
> Yes, that’s exactly it - but that’s a plugin, so it’s a no-go on hosted sites.

Well, sort of, until it gets enough traction or customers asking for it, then it gets adopted by the Discourse Team, which makes it more accessible to hosted sites (granted, I realize not all plugins are available for hosted sites)

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [Março 3, 2017, 12:58am UTC](https://meta.discourse.org/t/allowing-admins-to-place-arbitrary-links-in-topnav/58264/5 "2017-03-03T00:58:24Z")

</div>

I have no qualms with it being an officially supported plugin, however:

1. I assumed from Jeff’s comment above he supports this feature in core.
2. The plugin has known issues - including for the specific use case (topnav) that I’m looking to have supported.
3. Plugins are more complicated for sysadmins to handle. They require ssh access to the server, are updated independently, break more frequently than core (less tests), and are a sticky subject for hosting (which plugins go for which plans).
