Template variables
-
I'm not sure I'm too tired or just an idiot, but I want to do the following:
I've created a filter hook that fires every time the user loads the /user/:userslug/edit page and a plugin that can add custom fields in an array of objects.
I'm at the point where I add inputs with the given values to the accountedit.tpl, but I can't find a way to inject the variables.
I tried res.custom_fields, res.locals.custom_fields with no success. I tried looking up other templates and functions but I can't seem to find the solution. -
src/routes/api.js is where you want to look at.
res.json({})
is where you inject variables.
Copyright © 2024 NodeBB | Contributors