This doesn’t work because you can’t perform the actual logic calculation in a Template. This needs to be handled in the corresponding js by a Computed Property. Be sure to read the official Ember guides (making sure you select the same version that Discourse uses) and look at the code in one of the many popular Customization > Plugin on here to provide you with examples.
merefield
(Robert)
3
נושאים קשורים
| נושא | תגובות | צפיות | פעילות | |
|---|---|---|---|---|
| Accessing variables in a connector | 9 | 1347 | 11 בפברואר, 2021 | |
| How to use user field in hbr file? | 2 | 965 | 13 ביולי, 2022 | |
| Put user custom field on the user account page | 4 | 1361 | 23 בנובמבר, 2019 | |
| How to add custom fields to models | 48 | 9778 | 30 בספטמבר, 2025 | |
| Add a custom per-user setting in a plugin | 27 | 5173 | 20 בדצמבר, 2023 |