Putting my site's header/navigation elements above NodeBB's?
Hi, I'd like to put my site's header and navigation elements above the NodeBB header/nav.
I tried creating my own header.tpl with my own navigation HTML placed above NodeBB's navbar but it didn't work.
Any help would be greatly appreciated. Thanks!
What do you mean "it didn't work"?
@PitaJ I made a nodebb-theme-mytheme, copied the header template and added my own header/nav above the nodebb header. I also removed the fixed class from the nodebb header so it's not fixed to the top of the page. Then I did a ./nodebb rebuild tpl and restarted it. No changes took place. Its not taking my header template over the standard one.
@MattB did you activate your theme? Did you link your theme into node_modules? You may consider trying nodebb-plugin-customize instead of creating a custom theme if you're only changing the one template.
@PitaJ does nodebb-plugin-customize allow me to add a header above all of the NodeBB stuff? Also, is there a place I can read about activating and linking my theme?
@MattB the plugin allows you to modify templates however you like
Re: activating theme, what did you do when you made nodebb-theme-mytheme? It needs to be accessible through node_modules (whether it lives directly inside or is symlinked in) and you need to select the theme for use either in the ACP or by running
./nodebb activate nodebb-theme-mytheme. That's what I was referring to by activation.
@PitaJ okay great thanks! I'll try that. All I did was follow these steps:
e.g. If you want to modify topic.tpl, you would:
- Copy the contents of nodebb-theme-persona/templates/topic.tpl
- Create nodebb-theme-mytheme/templates
- Create a new file nodebb-theme-mytheme/templates/topic.tpl with the contents of the original topic.tpl file
- Make your changes as necessary.
- ./nodebb build tpl && ./nodebb dev to rebuild and start NodeBB
@PitaJ nodebb-plugin-customize is working perfectly. Very easy to use. Thanks for your help.