Can you help me

ElRoble

Member
Registered
Joined
Oct 8, 2019
Messages
18
Points
13

Reputation:

Hello good can you help me with the condition

HTML:
<xf:if is="{{$xf.visitor.isMemberOf(x)}}">
   Mostrar contenido...
</xf:if>

this condition only shows one group, however in my forum I have 3 user groups that are registered id = 2, vip id = 7 and collaborators id = 8
I would like to show the content to these 3 groups

HTML:
<xf: if is = "{{$ xf.visitor.isMemberOf (2,7,8)}}">
    Show content ...
</ xf: if>

it would be something like that I need your help please
 

Warfare

[Your Welcoming Staff Member]
Staff member
Administrator
Moderator
+Lifetime VIP+
V.I.P Member
Collaborate
Registered
Joined
Apr 29, 2020
Messages
344
Points
103

Reputation:

Hello good can you help me with the condition

HTML:
<xf:if is="{{$xf.visitor.isMemberOf(x)}}">
   Mostrar contenido...
</xf:if>

this condition only shows one group, however in my forum I have 3 user groups that are registered id = 2, vip id = 7 and collaborators id = 8
I would like to show the content to these 3 groups

HTML:
<xf: if is = "{{$ xf.visitor.isMemberOf (2,7,8)}}">
    Show content ...
</ xf: if>

it would be something like that I need your help please
ElRoble
Depending on the template being worked with, you may need to use $user instead of $visitor; $visitor is always the record for the current logged in user, $user is the record being processed (e.g. message author, member list, list of online users, etc.).
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
370
Points
103

Reputation:

Do it like this, you have to pass the multiple usergroups as an array :-

Add paranthese - [2,7,8]

PHP:
<xf:if is="{{ $xf.visitor.isMemberOf([2,7,8]) }}">

    Show content ...

</xf:if>
 
Last edited:

thomsa

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

Reputation:

to use addon HIDE to help.
 
Top