- Joined
- Jan 21, 2022
- Messages
- 655
- Points
- 103
Reputation:
Hello,
I want to make a modification in post_macros. The function should fetch the admin status of the user and if true, place an font awesome icon on top of the post.
For now I tried this code
But it's not showing up, without the foreach and if statement, it looks like this
Which is what I exactly want to achieve.
Can somebody maybe help me out with the foreach function.
Thanks!
I want to make a modification in post_macros. The function should fetch the admin status of the user and if true, place an font awesome icon on top of the post.
For now I tried this code
PHP:
<xf:foreach loop="$total.users" value="$user">
<xf:if is="$user.isMemberOf(3)">
<div class="staff-postbadge" title="Administrator">
<span class="stafficon"></span>
</div>
</xf:if>
</xf:foreach>
But it's not showing up, without the foreach and if statement, it looks like this
Which is what I exactly want to achieve.
Can somebody maybe help me out with the foreach function.
Thanks!