How to add custom dropdown menu to Discourse header?


#1

Hi,

I did custom dropdown Hamburger menu with HTML / CSS. I want to place that hamburger menu to Discourse header. What is the best way to integrate that?

Thanks.


<script type="text/discourse-plugin" version="0.4">
api.decorateWidget('header-icons:before', helper => {
    return helper.h('li', [
        helper.h('a#home-button.icon', {
            href:'https://www.google.com/',
            title: 'Google'
        }, helper.h('i.fa.fa-arrow-circle-up.home-button-icon.d-icon')),
    ]);
});
</script>

Can i use that method with some customization?


(Jay Pfaffman) #2

Have a look at Custom hamburger menu links


#3

I need to change menu design too. I already look at this tutorial. :slight_smile:

And I want to add different custom menu. I don’t want to change default hamburger menu :slight_smile:


(Kris) #4

So you want to create an additional dropdown menu that behaves like the default menu items? I think this post might help:

That code would give you the start of a new menu like this:


#5

Hi @awesomerobot. Thanks for the answer.

I want to make hamburger menu like that:

Can I adapt this?

Thanks!