XF 1.5 Edit Colour Based on Usergroup


Well-known member
So I know all about Conditional statements. However, I have yet to find one for what I want.
What I am trying to achieve is changing a border colour on someone's profile based on what usergroup they are in. (Not the person browsing the profile, but the user of the profile)

Example of what I mean
Usergroup One: https://snaap.me/kiqfgn
Usergroup Two: https://snaap.me/ERsU3Q
Usergroup Three: https://snaap.me/Kx5oGk
Usergroup Four: https://snaap.me/4m84Bj

Etc etc etc....

So basically the top colour is based on the usergroup of the profile you are visiting. how can this be achieved?
An example of this is for messages, I did something similar. I did this:
{xen:helper ismemberof, $message, 3}
<div class="messageHeading <xen:if is="{xen:helper ismemberof, $message, 3}">messageHeadingAdmin</xen:if>">

This says if the user of the message is an admin, add the "messageHeadingAdmin" class to it. I want something similar but instead of messages, for profiles.
Top Bottom