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!

  • 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
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>
 

Fred

Administrator
Staff member
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
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)
 

Fred

Administrator
Staff member
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