I'm trying to do this in an extension so I can have a permanent hamburger menu.
I'm probably way off here, but I'm trying! Will someone give me a tip or two?
app.initializers.add('zerosonesfun/flarum-hamburger', () => {
extend(IndexPage.prototype, 'sidebarItems', (items) => {
var myNav = {
view: function() {
return m("div", {back: false, className: 'App-backControl', drawer: true})
}
}
var noBack = {
view: function() {
return m("div", {back: true, drawer: false})
}
}
m.mount(document.getElementById('app-navigation'), myNav);
m.mount(document.getElementById('header-navigation'), noBack);
});
});
I also tried doing this another way. I was able to get a new div added above the new discussion button. But, that’s not what I want.