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

XF 1.5 Need Help with Conditional

#1
Hi.

I'm working on a conditional, with two parts, and they both work as individual conditionals, but when I join them, it's not working.

Here's what I want to do. If the user is in a group, and has their custom field set to "NO" then... else.

Code:
<xen:if is="{$visitor.customFields.display_ads_for_supportin} == 'no' AND !{xen:helper ismemberof, $visitor, 58}">

Do Stuff and block ads

<xen:else />

Do stuff with ads

</xen:if>

Thanks.
 

Brogan

XenForo moderator
Staff member
#2
How have you set up the custom user field?

If it is a checkbox, the syntax would be:
Code:
<xen:if is="!{$visitor.customFields.display_ads_for_supportin} AND {xen:helper ismemberof, $visitor, 58}">
 
#3
It's actually a select field, it takes "Yes" or "No" In hindsight, it probably should have been a checkbox, but I didn't set it up. It's been there a long time.