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

How do I properly set up a xen:if condition for...

Discussion in 'XenForo Development Discussions' started by EQnoble, Jun 5, 2011.

  1. EQnoble

    EQnoble Well-Known Member

    I am looking to have a div class inside of a xen:if condition that will make the div only display if a user is logged in.

    Anyone know what to do here? I thought I knew how but I have only managed to use <xen:if and a specific user id and not just a condition for any logged in user.
     
  2. Syndol

    Syndol Guest

    This should work:
    HTML:
    <xen:if is="{$visitor.user_id}">
    <div> your stuff here </div>
    </xen:if>
     
    EQnoble likes this.
  3. EQnoble

    EQnoble Well-Known Member

    And that will work for any logged in user as is?
     
  4. EQnoble

    EQnoble Well-Known Member

    That is not working for me. Hmmm...all I want is to have anybody who's logged in to be able to see this.
     
  5. EQnoble

    EQnoble Well-Known Member

    I have it now... I apparently needed to expose the template I was creating to the parent template's params.

    It works now
     

Share This Page