Grumpy Squid
Member
My goal is to use the message_macro template to apply a special border to avatars based on if they are an administrator, moderator, or a regular user. I've tried it a million ways and I can't get it to stop it from yelling at me. Coding experience is very amateur so I apologize for what is probably a dumb question. How should the syntax be?
In theory line 1 checks to see if they are part of the admin group, if they are then admin avatar holder div is applied. Line 4 checks to see if the user is a member of the moderator group, if they are then it applies the moderator avatar holder rather than the admin one. Line 7 should say that if they are apart of any other group apply the regular avatar holder div.
My guess is I'm screwing up in closing out these statements, any ideas?
Code:
<xf:if is="{{ $xf.user.isMemberOf(3) }}">
<div class="avatarHolder avatarHolderAdmin">
<xf:elseif is="{{ $xf.user.isMemberOf(4) }}">
<div class="avatarHolder avatarHolderModerator">
<xf:else>
<div class="avatarHolder">
</div>
</xf:else>
</xf:elseif>
</xf:if>
In theory line 1 checks to see if they are part of the admin group, if they are then admin avatar holder div is applied. Line 4 checks to see if the user is a member of the moderator group, if they are then it applies the moderator avatar holder rather than the admin one. Line 7 should say that if they are apart of any other group apply the regular avatar holder div.
My guess is I'm screwing up in closing out these statements, any ideas?
Last edited: