• We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Done Conditional Statement

toodlez

Member
Joined
Jul 3, 2016
Messages
43
How can I display one line of text if the user is the club owner, and a different one if they are not?

See below, doesn't seem to work for me:
<xf:if is="!$club.Owner">Owner<xf:else />Member</xf:if>
 

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,601
Hi
In club information ?
It should be <xf:if is="$club.Owner.user_id == $xf.visitor.user_id">Owner<xf:else />Member</xf:if>
I haven't try it be it should work
 

toodlez

Member
Joined
Jul 3, 2016
Messages
43
Hi
In club information ?
It should be <xf:if is="$club.Owner.user_id == $xf.visitor.user_id">Owner<xf:else />Member</xf:if>
I haven't try it be it should work
this just displayed everyone as "Owner" in the club if they are the club owner... and displays everyone as "player" if they are not the owner (including the club owner)
 

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,601
I have try it

Code:
<xf:if is="$xf.visitor.user_id == $club.Owner.user_id">
    Owner
<xf:else />
    Member
</xf:if>
in xfa_roster_club_show template
and it's work