Is it possible (and how) to make another hamburger menu?
I know the basics of adding an icon into the mix, I did this to create a button for latest stuff, in :
<script type="text/discourse-plugin" version="0.4">
api.decorateWidget('header-icons:before', helper => {
return helper.h('li.header-dropdown-toggle', [
helper.h('a.icon#latest-button', {
href:'https://MYDOMAIN/latest',
title: 'Latest'
}, helper.h('i.fa.fa-bolt.latest-button-icon')),
]);
});
</script>
Is it possible, in a similar way, to make another menu?
1 Like
Your post come up when I was searching to see if an answer already existed for a similar question (it didn’t really), this might be helpful to someone in the future
This is slightly rough but should get you 99% of the way there when it comes to having an additional menu item with a dropdown panel. Calling this one a pizza menu . Add this to your header.html file.
<script type="text/discourse-plugin" version="0.8">
api.createWidget('pizza-menu', {
tagName: 'div.pizza-panel',
panelContents() {
return "hello world";
},
html() {
return this.attach('menu-panel', {
contents: () => this.panelContents()
});
},
click…
5 Likes