Custom Hamburger Menu Links

:discourse2: Summary Custom Hamburger Menu Links will allow you to easily add links to the hamburger menu.
:eyeglasses: Preview Preview on theme-creator.discourse.org
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-custom-hamburger-links
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Samples

Desktop

Mobile


Settings

You add links via comma delimited values in this order:

Text,URL,Location,Target

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:

Target (optional)
Use “blank” if you need the link to open in a new tab.

59 إعجابًا

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

10 إعجابات

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

5 إعجابات

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!)

7 إعجابات

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)

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

6 إعجابات

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

إعجاب واحد (1)

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

إعجابَين (2)

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

إعجاب واحد (1)

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:

3 إعجابات

Maybe this will help? :wink:

That seemed to be the most requested feature and it wasn’t too hard to add support. That’s it for now though :slight_smile:

18 إعجابًا

My life is now complete :heart_eyes:

Thank you @tshenry this is fantastic news :clap:t2: :bowing_man:t2:

4 إعجابات

Hey quick question, how does one localize the custom hamburger menu text? I want to fully localize my forum and I can’t seem to find the text anywhere.

إعجابَين (2)

This is a useful component. But can we add font awesome icons there? It would be great to show social media profile icons there, so that people can follow our social profiles easily.

إعجابَين (2)

That is fantastic, thank you! :wink:
Maybe you can tell me quickly - how to localize the custom hamburger menu text?

3 إعجابات

I added support for icons, you could try out this fork of the component: GitHub - nolosb/discourse-custom-hamburger-links-with-icons

Two notes on usage:

  • The icon would be the first item in the list:
    Screenshot from 2021-07-01 11-10-15
    If you want a link without icon, just don’t add it, but keep the trailing comma ,
    Screenshot from 2021-07-01 11-10-40

  • If the icon is not included by default, remember to add it to the icon list:
    Screenshot from 2021-07-01 11-11-06

7 إعجابات

Can you puch these changes to the official Theme component? It’s always better to have the official Theme component installed as it’s going to be maintained with Discourse future updates.

8 إعجابات

سيكون من الجيد دمج هذا مع المكون الإضافي الرسمي. أريد إضافة أزرار وسائل التواصل الاجتماعي في قائمة الهامبرغر. ولكن بدون أيقونات لن تبدو لطيفة.

أيضًا، من غير الواضح إلى حد ما أنه لا يُسمح بوجود مسافات في حقول CSV.
يعمل هذا: Footer Link,https://google.com,f
ولكن مع وجود مسافات، يتم إدراج العنصر في الحقل العام بدلاً من تذييل الصفحة، بسبب المسافة المفقودة: Footer Link, https://google.com, f

إعجابَين (2)

أهلاً!

مع الشريط الجانبي الجديد، ستكون القدرة على إضافة أيقونات مخصصة إلى روابطنا إضافة رائعة.

يمكنني محاولة العمل على هذا وتقديم طلب سحب (PR) في الأيام القادمة…

9 إعجابات

سؤال سريع…

لقد قمت بتثبيت مكون السمة على مثيل Discourse جديد، ولكن لسبب غير محدد، لن تظهر الروابط الافتراضية في قسم المزيد في الشريط الجانبي:

لم أقم بتعديل الكود، إنه تثبيت جديد لمكون السمة.

ومع ذلك، فإن مكون السمة، الذي تم تثبيته قبل عامين، يعمل على منتداي الآخر:

لا يظهر أي خطأ. أي فكرة عن سبب عدم عمل مكون السمة على تثبيتي الجديد؟ :thinking:

4 إعجابات