What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

Done Conditional Statement

toodlez

Member
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>
 
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
 
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)
 
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
 
Top