• Hey,

    I set up nodeBB v1.5.2 with MongoDB & Redis behind Cloudflare (just fyi).

    I would like to edit the existing template account/edit.tpl.
    For this I tried editing the build/public/templates/account/edit.tpl but the template is getting resetted every time reloading nodeBB.
    I assume, the build directory gets generated every time the system reloads.

    The second attempt was to change the edit.tpl in src/views/account/edit.tpl but the same effect as above occured. (I also tried deleting the file build/public/templates/account/edit.tpl)

    Nontheless, new files in src/views/... like src/views/account/edit/custom.tpl will get applied to build/public/templates/... after restarting.

    Which is the correct way to edit existing templates in nodeBB?

    Thanks a lot!

    What I've tried (overview)

    • edit build/public/templates/account/edit.tpl > nope
    • edit src/views/account/edit.tpl > nope
    • delete build/public/templates/account/edit.tpl & edit src/views/account/edit.tpl > nope

  • You probably want to edit account/edit.tpl for whichever theme you're using. For instance, if you're using persona, it would be node_modules/nodebb-theme-persona/templates/account/edit.tpl.

    Be aware, these changes will be overwritten whenever persona is updated. The most correct way is to create a child theme of persona and make your template changes there, but that is more complicated.

  • Oh! My bad that I haven't thought of this... I'll try it out.

    Thanks for the fast response! 🙂

  • Works like a charm, thanks again!

Suggested Topics

| | | |