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

Template Conditional Not Disappearing

fattony69

Well-known member
#1
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.
 

Brogan

XenForo moderator
Staff member
#2
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?
 

fattony69

Well-known member
#3
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?
It shows up when I am reading a thread in node 24.
 

Brogan

XenForo moderator
Staff member
#4
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.
 

Brogan

XenForo moderator
Staff member
#10
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.
 

fattony69

Well-known member
#11
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.
Doesn't work and I tried the parent node as well.
 

Brogan

XenForo moderator
Staff member
#16
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.
 

Brogan

XenForo moderator
Staff member
#18
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.