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

XF 1.5 Privacy conditional in templates

Discussion in 'Styling and Customization Questions' started by Rudy, Mar 25, 2016.

  1. Rudy

    Rudy Well-Known Member

    In a template, I can surround code by a conditional to limit viewing of something to members only. Without it, I can display the code to the public. I can also make something viewable to moderators or individual usergroups only. Quite simple, really.

    But, what I also want to do is find a way to display something to "People You Follow Only," just like the options we have in a member's privacy settings.

    Does a conditional exist for this, maybe some parameter that is available but not in the documentation? (For instance, is this something that is already in an existing template?)

    This is part of a bigger idea I am working on, to add some information to the membercard. I'll post the results once it is working.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Try using $user.isFollowingVisitor.

    That will evaluate to true if you (user) are following me (visitor) and I view your member page or card.
     
    Rudy likes this.
  3. Rudy

    Rudy Well-Known Member

    Got behind on stuff, but thanks--I will give this a try in a week or so. Finishing up a rush job elsewhere that is hogging my time.
     

Share This Page