XF 1.3 Hide avatars for users without one

Warchamp7

Active member
Licensed customer
I'd like to hide the avatar block for any user without an avatar. How best can I go about this, since XenForo outputs the s, m or l sizes in the <img> tag for default avatars.
 
You could try using a conditional statement in the template:

Code:
<xen:if is="!{$visitor.avatar_date} AND !{$visitor.gravatar}">
Content to remove here
</xen:if>
 
  • Like
Reactions: fly
Ah, silly me. Visitor isn't what I want in this case. Changed it to:

Code:
<xen:if is="{$user.avatar_date} OR {$visitor.gravatar}">

Hides the avatars in posts for users who don't have one. My initial post may not have been totally clear on the behaviour I wanted
 
Back
Top Bottom