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:
Robin Ward
2017-10-03 14:39:56 -04:00
parent 4b7256d2e4
commit c72ceb1f2d

View File

@@ -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;