Navigation - Add custom menu items

(Vinoth Kannan) #1



Plugin to add a custom menu items / nav links to your Discourse website automatically (without any coding / programming tweaks).

Supported Menus

List of currently available locations where the custom menu links can be added.


See it in action


Repo is at:

In your app.yml add:

    - exec:
        cd: $home/plugins
          - mkdir -p plugins
          - git clone
          - git clone

And then rebuild the container:

./launcher rebuild app


You can easily add your custom menu links in /admin/plugins/navigation path.

Branding - Custom brand header with logo, navigation and icons
What's the simplest way to add a new navigation menu item?
Allowing Admins to place arbitrary links in topnav
How can I see in the topics list topics where I have participated?
The future of HTML/CSS customisations
Events Plugin :calendar:
Inconsistent tag selection when viewing tag pages
(STiNGER) #3

I installed your plugin but I do not see the configured link appear.
Not in the main navigation menu, nor in the hamburger general links or footer links.
I followed your instructions to the letter.
It there something I am missing?
I am running v1.7.beta11.

(STiNGER) #4

UPDATE: it needed a browser refresh. I see the configured link now in the general link and footer link sections of the hamburger menu. What can I do to make the link appear in the main menu?

(Vinoth Kannan) #5

To see main menu changes you should restart your app using ssh command below

./launcher restart app

In rare case if your main menu still didn’t appear. do rebuild

./launcher rebuild app

(STiNGER) #7

Thanks, I’ll try that!

Yep, the
./launcher restart app
did it.


(Matt Landseadel) #8

I had to rebuild app to make an entry show in Main menu. Even then, it showed as an unstyled link just beneath “Latest”. Isn’t it supposed to be styled and to the right of “Categories”?

Discourse Version v1.8.0.beta2 +72

I took a look at the created HTML.

<ul id="ember912" class="nav nav-pills ember-view">
  <li title="topics with recent posts" id="ember925" class="active ember-view"><a href="/latest">Latest</a></li>
  <li title="topics created in the last few days" id="ember927" class="ember-view"><a href="/new">New</a></li>
  <li title="topics you are currently watching or tracking with unread posts" id="ember929" class="has-icon ember-view"><a href="/unread"><span class="unread"></span>Unread (3)</a></li>
  <li title="the most active topics in the last year, month, week or day" id="ember931" class="ember-view"><a href="/top">Top</a></li>
  <li title="all topics grouped by category" id="ember933" class="ember-view"><a href="/categories">Categories</a></li>
<div id="ember934" class="ember-view"><li><a href="">Test</a></li>
<span id="ember935" class="ember-view"><!----></span>

Seems the ember934 should just be a li instead of a div.

(Chris Beach) #9

Is this plugin now functioning correctly and will it be actively maintained? I’d really like to use it but have been burnt before by unofficial plugins :frowning:

(Marc Billow) #10
<ul id="ember904" class="nav nav-pills ember-view">
  <li title="topics with recent posts" id="ember917" class="active ember-view">
    <a href="/latest">Latest</a>
  <li title="all topics grouped by category" id="ember919" class="ember-view">
    <a href="/categories">Categories</a>
  <li id="ember920" class="ember-view">
      <a href="">Test Link</a>

You will notice the redundant list item <li> tag around the added link. This is what is causing it to be rendered without the correct style. I just submitted a PR on the repo fixing this issue.

It is a pretty simple plugin, so it doesn’t require that much development in it’s current form. My change was just merged so you should be all set to use it.

(Christoph) #11

I just tried installing both the navigation and the branding plugin but got the following error in the error log:

Error: There is no route named adminPlugins.navigation
    at k.handlersFor (
    at n.applyToState (
    at T.applyIntent (
    at y (
    at i._prepareQueryParams (
    at i.normalizeQueryParams (
    at i.generateURL (
    at i.<anonymous> (
    at c.h.get (
    at Object.r [as get] (
    at t.compute (

Visually, I noticed that there was a lot of white space in the navigation bar and the plugin page did not display properly (no plugins listed). When I uninstalled the two plugins, it worked again…

How to disable a plugin when admin plugin page is not loading
(Joe Buhlig) #12

@vinothkannans, I haven’t tested this but this might be due to a missing / for path in your ember route map. I’ve had better luck spelling it out that way.

(Raddah ) #15

same with me


@vinothkannans Hi! How to remove shortcuts? I disable the plugin, removed it form yaml file, rebuild whole container, and shortcuts in main menu are still there. How to get rid of them?

(Vinoth Kannan) #17

It must be removed now. Are you using brand header plugin?

(Clay Heaton) #18

@vinothkannans I just added the navigation plugin to a new rebuild of Discourse. The links will show up in the hamburger menu, but they do not appear in the main menu. Is there a problem with the plugin or anything else that I need to do to get them to appear there? In particular, I’m trying to add a main menu link called Tags that links to /tags.

Here are the settings. I hard-refreshed, etc.

Edit: Nevermind… I had to ./launcher restart app again to get it to appear.

(Reg Natarajan) #19

Hello. I’m totally new to Discourse and I’ve just installed this plugin. Thanks very much for it! Two questions if I may.

  1. My menu items are stacked one on top of the other instead of nicely appearing horizontally. Is there some config item I need to set to make them appear in a horizontal line?

  2. I know it’s bad form but is there any way to make the links open in a new window?

Thanks in advance.


(Vinoth Kannan) #20

@regnatarajan, “discourse-navigation” plugin is currently not in active development. Instead you can use Iconified Header Links and Custom hamburger menu links theme components.

You have to edit existing theme component codes for your need.

(Sam Saffron) #24

Marking this broken plugin, use theme components to achieve the same functionality. A couple of options are at: Navigation - Add custom menu items

(Sam Saffron) closed #25