problem with sample messages for certain groups

leanndamiann1

Well-known member
Registered
Joined
Apr 22, 2021
Messages
190
Points
28

Reputation:

How am I putting the code so that it shows me in each certain group of users

For example, this code is so that it only shows me for those in the group with the id "2"

<xf:if is="{{$xf.visitor.isMemberOf([2])}}">
It shows it fine for the group with id "2", but it also shows it for the group with id "6", and I only want it to be for id "2", is there any solution? thank you
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,520
Points
523

Reputation:

How am I putting the code so that it shows me in each certain group of users

For example, this code is so that it only shows me for those in the group with the id "2"

<xf:if is="{{$xf.visitor.isMemberOf([2])}}">
It shows it fine for the group with id "2", but it also shows it for the group with id "6", and I only want it to be for id "2", is there any solution? thank you
leanndamiann1Is it possible that the user is in both groups located?
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
647
Points
103

Reputation:

Try <xf:if is="$xf.visitor.isMemberOf === 2"> if that doesn't work, then try <xf:if is="$xf.visitor.isMemberOf(2)">
 

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,072
Points
173

Reputation:

Show content for only one user group
<xf:if is="{{$xf.visitor.isMemberOf(x)}}"> Show content... </xf:if>
 
Top