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

XF 1.2 Conditional for not member of

Discussion in 'XenForo Questions and Support' started by Puntocom, Sep 3, 2013.

  1. Puntocom

    Puntocom Well-Known Member

    hello, I have been looking for this info in XenForo Help, Resources and I can't find it although it's pretty basic.

    I want to know how to make this template conditional in a correct way:
    Thank you in advance.
     
  2. Puntocom

    Puntocom Well-Known Member

    This never shows the option :S
     
  3. Chris D

    Chris D XenForo Developer Staff Member

    <xen:if is="!{xen:helper ismemberof, $visitor, X}">
     
    Puntocom likes this.
  4. Puntocom

    Puntocom Well-Known Member

    Code from navigation template.
    Code:
    <xen:if is="!{xen:helper ismemberof, $visitor, 13}">
    <li class="navTab PopupClosed"><a style="color: #ffff2c" href="http://example.com/threads/c%C3%B3mo-ser-vendedora.6959/" class="navLink">Hazte vendedora</a></li>
    </xen:if>
    Testing permissions for users in that group, that content appears... any idea? I want to show an ad to become premium only for non-premium users.
     
  5. EQnoble

    EQnoble Well-Known Member

    Sometimes when quickly saving changes you need to ctrl-f5 (while viewing the page) on your browser to make the changes appear . Otherwise what you have posted looks correct assuming that group 13 is the group that is not supposed to see it.
     
    Chris D likes this.
  6. Puntocom

    Puntocom Well-Known Member

    I have double checked it, code is exactly as I posted before in navigation template, and with Ctrl+F5 the site loads every element again but the item appears for users in group 13. Any idea?
     
  7. Puntocom

    Puntocom Well-Known Member

    It works nice.... it only doesn't work when I use Testing permissions from user in AdminCP.
     
    Brogan likes this.
  8. Chris D

    Chris D XenForo Developer Staff Member

    That's completely expected behaviour.

    That conditional isn't anything to do with permissions.
     
    Puntocom likes this.

Share This Page