Edit system template
-
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 thebuild/public/templates/account/edit.tpl
but the template is getting resetted every time reloading nodeBB.
I assume, thebuild
directory gets generated every time the system reloads.The second attempt was to change the
edit.tpl
insrc/views/account/edit.tpl
but the same effect as above occured. (I also tried deleting the filebuild/public/templates/account/edit.tpl
)Nontheless, new files in
src/views/...
likesrc/views/account/edit/custom.tpl
will get applied tobuild/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
& editsrc/views/account/edit.tpl
> nope
- edit
-
You probably want to edit
account/edit.tpl
for whichever theme you're using. For instance, if you're using persona, it would benode_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!