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

Conditional statement not working

Discussion in 'Troubleshooting and Problems' started by fredrikse, Oct 13, 2012.

  1. fredrikse

    fredrikse Active Member

    Hi,

    I'm trying to get at conditional statement to work. But it's not working at the moment. Here is the code:

    PHP:
    <xen:if is="{xen:helper ismemberof, $visitor, 11}"><li><a
                            
    class="{xen:if "{$selectedKey} == 'alerts/watchThreads'", 'secondaryContent', 'primaryContent'}"
                            
    href="{xen:link watched/threads}">{xen:phrase watched_threads}</a></li></xen:if>
    This piece of code controls the option "Watched threads" in the user profile settings page. Now I'm trying to block this feature depending on wether a user is a member of a secondary user group (groupID = 11). But this code is apparently still visible.

    What could be wrong?

    I'm using TMS.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The condition appears correct. That condition will display the code if the user is a member of group 11. If they are not in group 11 then it will not display the code.
     

Share This Page