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

Hiding Templates from User Groups

Discussion in 'XenForo Questions and Support' started by Savvy, Jul 21, 2011.

  1. Savvy

    Savvy Member

    Is there a way to hide specific templates from certain members?
    For example, I have a group called "Premium Gamers"

    This is a purchased upgrade and as part of the upgrade I want to make it so that the members in this group won't see my ads. I have my ads in a template called adsense_top

    Is there a code or mod that I can add to make it so the Premium Members group won't see the adsense banner?
  2. Dean

    Dean Well-Known Member

  3. James

    James Well-Known Member

    A simple condition using the ismemberof helper should work.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Wrap the ad code in this conditional.

    <xen:if is="!{xen:helper ismemberof, $visitor, 3} AND !{xen:helper ismemberof, $visitor, 4}">
    ad code here
    Change the values to reflect the groups you want to hide the advert from.

    You can add as many groups as you like.
    physicspirate likes this.
  5. Savvy

    Savvy Member

    Thanks everybody.

Share This Page