XF 1.3 Conditional for 'if member isn't in this usergroup'?

Liam W

Well-known member
Is there a template variable for the usergroups a member is in? I want to show ads to everyone except members of this usergroup...

Liam
 

HWS

Well-known member
Code:
<xen:if is="!{xen:helper ismemberof, $visitor, X}">

CONTENT

</xen:if>
Replace X with your user group and CONTENT with your content.
 

reohh

Member
Create a custom template and put this code in:
Code:
<xen:if is="{$visitor.user_group_id} != 3">
    <div style="text-align: center;  padding: 7px;">
<!--INSERT ADSENSE CODE HERE -->
</div>
</xen:if>
This will show the ad for anyone not in usergroup 3

Now in your PAGE_CONTAINER or wherever you want the ad to appear insert this code:

Code:
<xen:include template="NAME_Of_CUSTOM_AD_TEMPLATE" />
 
Top