Custom hamburger menu links

This is a theme component that will allow you to easily add links the hamburger menu.


Repository link
https://github.com/hnb-ku/discourse-custom-hamburger-links

Preview:


Samples

Desktop

Mobile


Settings

You add links via comma delimited values in this order:

Text,URL,Location

Text
is the name of the link that shows on the menu.

URL
is the path you want the link to have. You can use relative paths like

/tags/funny
or
/t/231

if you prefer.

Location
can have one of two values. Either the letter g or the letter f

Use “g” if you want the link to appear in the generalLinks section:

or use “f” if you want the link to appear in the footerLinks section:


How do I install this theme?

follow the official theme installation guide here:

Then add the component to your theme as a theme component and you’re all set!

51 Likes

Thats a nice addition, thanks for that. It’s already installed :smiley:

Could you add a target option so that it is possible to open the link in a new tab/window (if no target is given just use “_self”)

Text,URL,Location,Target

8 Likes

Please add an option to place the link at the very top of the dropdown panel :slight_smile:

5 Likes

I might have a go at this myself at some stage (have to learn a wee bit first), but I’m putting my thoughts down here for now:

Feature Requests:

No 1: Allow hover text. This is now used for the core hamburger links, and would be very helpful

No 2: Merge with Rob’s fork, which is clearly a good idea:

No 3: Allow target="_blank" as per Richie (also clearly a great idea):

No 4: Allow more control of link ordering (likely very tricky!)

6 Likes

Is there a way that the custom hamburger menu links can be translated depending on the user interface language?

For example, I could wrap yaml translation files into a custom plugin, but I’m not sure which translation keys I could use.

No practical way to do this?

2 Likes

is there any way on customizing the links in order to place them on a certain order?

5 Likes

So are we got the possibility to open in new tab?

1 Like

I don’t think anyone is working on this anymore @savas :confused:

2 Likes

Seems i have trouble adding this to footer links even i add f on Locations. Does anyone have the same trouble?

1 Like

I got really excited this evening when I saw this!!

I was soooooo much hoping that there was a new feature to open links to a target="_blank" :scream:

Jumped straight on GitHub to see what was new!

Screen Shot 2021-03-06 at 21.18.00

Oh @tshenry I was so disappointed :pensive:

:rofl:

2 Likes