mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
An option to not display categories in the hamburger
This is mostly useful if your site has very few categories.
This commit is contained in:
@@ -33,6 +33,10 @@ createWidget('priority-faq-link', {
|
||||
export default createWidget('hamburger-menu', {
|
||||
tagName: 'div.hamburger-panel',
|
||||
|
||||
settings: {
|
||||
showCategories: true
|
||||
},
|
||||
|
||||
adminLinks() {
|
||||
const { currentUser } = this;
|
||||
|
||||
@@ -176,8 +180,12 @@ export default createWidget('hamburger-menu', {
|
||||
}
|
||||
|
||||
results.push(this.attach('menu-links', {name: 'general-links', contents: () => this.generalLinks() }));
|
||||
results.push(this.listCategories());
|
||||
results.push(h('hr'));
|
||||
|
||||
if (this.settings.showCategories) {
|
||||
results.push(this.listCategories());
|
||||
results.push(h('hr'));
|
||||
}
|
||||
|
||||
results.push(this.attach('menu-links', {name: 'footer-links', omitRule: true, contents: () => this.footerLinks(prioritizeFaq, faqUrl) }));
|
||||
|
||||
return results;
|
||||
|
||||
Reference in New Issue
Block a user