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

Template Conditional Not Disappearing

Discussion in 'Troubleshooting and Problems' started by fattony69, Mar 23, 2011.

  1. fattony69

    fattony69 Well-Known Member

    Hey,

    I am trying to get my template conditionals to work, but for some reason, one doesn't work. I am trying to hide something in one forum. It doesn't show up in the forum list, but not in the threads themselves. Here is the code I am using:

    Code:
    <div style="section">
    <xen:if is="{$quickNavSelected} != 'node-24'">
    <xen:if is="!{xen:helper ismemberof, $visitor, 5} AND !{xen:helper ismemberof, $visitor, 6}">
        My Information
    </xen:if>
    </xen:if>
    </div>
    It won't disappear. I am trying to get it to disappear.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    So your conditional is as follows: if not in node 24, and if not a member of user group 5 or 6, show the information.

    That means every forum except 24 will display the content to everyone who isn't in group 5 or 6.

    What is it that's not working exactly?
     
  3. fattony69

    fattony69 Well-Known Member

    It shows up when I am reading a thread in node 24.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Are you in user group 5 or 6?

    I use that exact some conditional to hide adverts from certain groups and one node altogether (although it's a Page, not a forum) and it works fine for me.
     
  5. fattony69

    fattony69 Well-Known Member

    No I am not.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That's why then.
     
  7. fattony69

    fattony69 Well-Known Member

    But you said: "will display the content to everyone who isn't in group 5 or 6."
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Exactly.

    You're not in group 5 or 6 and the content is visible to you.
     
  9. fattony69

    fattony69 Well-Known Member

    But since I am in node 24, it shouldn't show up?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I've just used your exact code taken from the first, placed it in the PAGE_CONTAINER template and it works exactly as expected.

    I am not in user group 5 or 6 and the content does not appear for me in that node only.
    It appears on every other node.

    Double check the node ID.
     
  11. fattony69

    fattony69 Well-Known Member

    Doesn't work and I tried the parent node as well.
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    Not sure what else I can say to help.

    It works exactly as intended for me.
     
  13. fattony69

    fattony69 Well-Known Member

    Hmmm...need to figure out my problem now.
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    Do you have more than one style?

    Are you editing the template for the correct style, i.e. the parent?
     
  15. fattony69

    fattony69 Well-Known Member

    Yes, I am.
     
  16. Brogan

    Brogan XenForo Moderator Staff Member

    The only other thing I can thing of is, are you applying this to a category node, instead of a forum node?

    Unless you have categories set to open in a new page, it won't work.
     
  17. fattony69

    fattony69 Well-Known Member

    I tried that too.
     
  18. Brogan

    Brogan XenForo Moderator Staff Member

    I'm out of ideas then.

    Your code works fine on my installation so I have no idea why it isn't working on yours.
     
  19. fattony69

    fattony69 Well-Known Member

    I'd say it is a bug, but there must be a dumb reason why I am screwing up.
     
  20. Brogan

    Brogan XenForo Moderator Staff Member

    Definitely not a bug.
    I can use your code without a problem.
     

Share This Page