• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Is this conditional statement correct?

akia

Well-known member
#1
I want to show content to only members that are logged into my site that are not members of usergroup 4 and 8, I also want to hide that content if they are viewing forums or threads in that forum with node id of 3 and 8.

Will this statement do the trick?

<xen:if is="{$visitor.user_id} AND !in_array({$thread.node_id}, array(3, 8)) AND !{xen:helper ismemberof, $visitor, 4, 8}">
 

akia

Well-known member
#2
Right I've worked a bit more on this and now have the following:

<xen:if is="{$forum.node_id} != 27 AND !{xen:helper ismemberof, $visitor, 6, 8}">
<xen:if is="{$visitor.user_id}">
Show to membwers
<xen:else />
show to guests
</xen:if>
</xen:if>
it seems to work