Putting my site's header/navigation elements above NodeBB's?
-
-
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.
-
@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
-
@phenomlab what version of the customize plugin do you have installed? Are there any errors in the browser console or the NodeBB logs when you visit that page? Also what version of NodeBB and what version of Node?
-
@phenomlab you want version 2.0.0 of the plugin, it should work
-
Actually 2.0.0 may not work until 1.17.0 releases next week
-
Good to know, eh?