XF 1.4 xen:helper ismemberof

RichardKYA

Well-known member
Hello,

"xen:helper ismemberof" is not working for me in the "message" template. Is it meant to work here?

It seems to work everywhere else. My code is exactly same as the places that I use it and it works as it should. (I copied and pasted it, so it is EXACTLY the same)

Thank you :)
 
Code:
<xen:if is="{xen:helper ismemberof, $user, 3,4,5,6}">
           <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user, 1, 1}</xen:contentcheck></em></xen:if>
         <xen:elseif is="{xen:helper ismemberof, $user, 2,7}" />
           <em class="userTitle" itemprop="title">{xen:phrase kya_active_member}</em>
         <xen:else />
           <em class="userTitle" itemprop="title">{xen:phrase kya_inactive_member}</em>
         </xen:if>
 
Code:
<xen:if is="{xen:helper ismemberof, $user, 3,4,5,6}">
           <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user, 1, 1}</xen:contentcheck></em></xen:if>
         <xen:elseif is="{xen:helper ismemberof, $user, 2,7}" />
           <em class="userTitle" itemprop="title">{xen:phrase kya_active_member}</em>
         <xen:else />
           <em class="userTitle" itemprop="title">{xen:phrase kya_inactive_member}</em>
         </xen:if>

Can you use replace $user with $visitor and see if it would make any difference?
 
You replace $user with $message, because the $message variable contains the user info. You can see this with the message_user_info include:
Code:
<xen:include template="message_user_info">
<xen:map from="$message" to="$user" />
</xen:include>
 
Awesome

I did try that yesterday before I said "Sorry to be a dumbass......." and it didn't work.

But it's OK, because as it turns out, I'm just a double dumbass (the doctors say that there is nothing they can do :(:ROFLMAO:)

I missed the $user in this bit...
Code:
<xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user, 1, 1}</xen:contentcheck></em></xen:if>

....but I've changed it now and it works fine (y)

Thank you for your help :)
 
Top Bottom