I updated to v1.3.0 and now I'm getting a different error when trying to visit the forumTypeError: Cannot read property 'loggedIn' of undefined at helpers.displayMenuItem (/home/myuser/nodebb/public/src/modules/helpers.js:20:44) at checkConditionalHelpers (/home/myuser/nodebb/node_modules/templates.js/lib/templates.js:269:76) at parse (/home/myuser/nodebb/node_modules/templates.js/lib/templates.js:424:15) at parseTemplate (/home/myuser/nodebb/node_modules/templates.js/lib/templates.js:133:14) at Object.templates.parse (/home/myuser/nodebb/node_modules/templates.js/lib/templates.js:119:11) at /home/myuser/nodebb/node_modules/templates.js/lib/templates.js:169:30 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)
Custom Nav bar above NodeBB nav bar
I'm trying to implement our overall site navigation above the nodebb nav bar. Are there any ideas on how we can do this?
The best example I could find is this site which uses nodebb:
Mail / Blog / Community / Forum are external links and then below that is custom nodebb navigation bar. When user shrinks it down to mobile size, the sidebar menu has navigation for both nav bars separated.
Can somebody please guide me on how to do this? I am willing to do some custom development, but don't know where to start.
crazycells last edited by
We are also trying to do something like this...
Separate lines for main links including forum / blog etc...
and another one below for forum options...
Any help would be appreciated...
Well, the best way would probably be to just create a new theme with that modification.
If you're modifying Persona the places you should be looking at are:
https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/header.tpl - this file contains nav elements themselves, but imports their contents. You'll want to either add another nav that'll be below the one for NodeBB menu (you'll need to still change css for it though, sice if you just copy the nav classes you'll end up with one navbar on top of another), or create additional div for the second line and again - change css to make each div span a line.
The navbar template itself. You will probably want to move some of the elements from here to the template for second line, or - alternatively - add the second line here instead of doing it in the header.tpl
https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/partials/slideout-menu.tpl - mobile menu template. If you want to separate sitewide stuff from forum on mobile, do it here.
https://github.com/NodeBB/nodebb-theme-persona/blob/master/less/header.less - less file with styles for header elements
crazycells last edited by
@oplik0 thanks a lot for the great explanation. I will update the topic later...