XF 1.5 Profile Conditionals

I am trying to modify the "member_view" template to display information based on a particular staff position under the "Information" tab on the profile. This is what I have so far:

Code:
Snipped

Doing this will provide the following:



I was trying to play around with the conditionals, however, I am failing. I want the aforementioned code to be displayed on a particular users profiles, based on UID, however, I also want it to be displayed to registered users as well at the same time. I don't want the code to be displayed on all profiles, just ones that fit a particular conditional.

Any help?
 
Last edited:
To target the individual user profile that you're on you need to use $user. To target the actual person viewing the profile you need to use $visitor

So, if $user.user_id = x AND $visitor.user_id
 
To target the individual user profile that you're on you need to use $user. To target the actual person viewing the profile you need to use $visitor

So, if $user.user_id = x AND $visitor.user_id

I must be doing something wrong here when trying that, I am sure it's with the code I am using:

Code:
<xen:if is="{$user.user_id == 1716} AND {visitor.user_id}">
blah blah blah
</xen:if>

What am I doing wrong?
 
It sounds like the placement may be an issue because the code should work. Is it inside a content check or anything that may be returning false?

Screenshot_20160608-181000.webp
 
Last edited:
No, it's in-between a closing <div> and an opening <xen:if>. For testing purposes, I added the above code to the very top of the "member_view" template and I got the same syntax error that I have been getting.
 
Back
Top Bottom