Can't display custom fields
-
Have a small problem with nodebb-plugin-ns-custom-fields (https://github.com/NicolasSiver/nodebb-plugin-ns-custom-fields), installed it, builded NodeBB once again, the "Custom Fields" appeared in "extensions", added key/names, but don't know why added by me new custom fields are not visible in the user profile. Any help?
I think I shall place small piece of code mentioned here https://github.com/NicolasSiver/nodebb-plugin-ns-custom-fields#profile-view to display it, but the question is where?
Would be really glad for help.
-
No one?
I tried to insert the code into many places, but still can't figure out. Anyone is at least aware if this shall work with v1.7.5?<!-- IMPORT partials/account/custom_fields_flex.tpl -->
-
Solved by myself, this documentation could be a bit updated for easier implementation, for those who will the same problem, let me give necessary steps:
- Install the plugin
- Rebuild then restart NodeBB
- Add some custom fields
- You can edit them by going to edit profile and "Change Extra"
- To display them in user profile, in case if you're using Person theme, go to nodebb-theme-person -> templates -> account -> profile.tpl
- Paste the code wherever you want it do be visible
<!-- IF customFields.length --> <div class="custom-fields"> <!-- BEGIN customFields --> <div class="custom-field-item"> <span class="field-label">{customFields.name}</span> <span class="field-value">{customFields.value}</span> </div> <!-- END customFields --> </div> <!-- ENDIF customFields.length -->
- Rebuild then restart NodeBB