Forum Discussion
To add, in my logic sample above I would mix javascript and freemarker. I would use javascript to compile the list of avatars needing ranks, then use freemarker to access the rank, the use javascript again to place the rank icons on the page. Is this doable? It seems like mixing javascript and freemarker like this might not work.
Tyler There are a few hack ways to do this. Some is not so dirty, some is dirty. If you want a clean way, you have to rewrite the whole mesasge-list component.
Hacks:
Method 1 (dirty):
- Use Javascript to get all the user IDs on the page and pass it to a endpoint via ajax. Then endpoint returns all the rank info.
Method 2 (not so dirty):
- If you inspect DOM, you can find some css class like this, <span class="UserName lia-user-name lia-user-rank-Community-Manager lia-component-common-widget-user-name">. See "lia-user-rank-Community-Manager". You can use JS/jQuery to fetch the lia-user-rank-xxxxx info. And turn it into proper rank html.
Related Content
- 8 years ago
- 7 months ago