Forum Discussion
Tyler- I will suggest you not to use jQuery for this purpose. You can create your custom component and add it to your ForumMessagePage(message-list).
Inside the component you can get the author id by env.context.message.author.id environment variable.
<#assign ranking= restadmin("/users/id/${env.context.message.author.id}/ranking/display/left_image/url").value >
There is an OOB component for user rank as well. Have you tried adding this component <component id="author-rank"/> to you ForumMessagePage quilt?
- peterlu8 years agoChampionTariqHussain env.context.message.author.id only works in ForumMessage quilt. On ForumPage quilt which contains the message-list, there is no way to control the sub quilt. I think Tyler is talking about message list in Forum Page , not message list in Forum Topic Page. I would love to have fine control on Forum Page message list with freemarker, but there is no sub quilt for it. Sad.
- TariqHussain8 years agoBoss
Thanks, peterlu for clarification. Tyler - If you want to show user rank on the ForumPage message-list component, there are two way to achieve this.
1. As peterlu mentioned use JS to append user rank.
2. If you don't want to use JS for this. You can get another column added to message-list component by lithium support. They will add another column to it and will provide a custom component where you can write code for that column. All the evn context object will work on that component. We have done this for one of our community.
- peterlu8 years agoChampionThe best way is to get Lithium Support to add a freemarker way to do it, like TariqHussain mentioned. It is the clean way to do it.
Related Content
- 8 years ago
- 7 months ago