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!


  • Global Moderator

    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.


  • Global Moderator

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


  • Global Moderator

    @MattB the plugin allows you to modify templates however you like


  • Global Moderator

    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:

    1. Copy the contents of nodebb-theme-persona/templates/topic.tpl
    2. Create nodebb-theme-mytheme/templates
    3. Create a new file nodebb-theme-mytheme/templates/topic.tpl with the contents of the original topic.tpl file
    4. Make your changes as necessary.
    5. ./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.


Log in to reply
 

Suggested Topics

  • 4
  • 2
  • 5
  • 1
  • 15
| |