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

XF 1.4 ads appearing in privacy policy

Discussion in 'Troubleshooting and Problems' started by trman, Jan 3, 2015.

  1. trman

    trman Active Member

    I added adsense to the ad_above_top_breadcrumb template. I didn't want it to appear in my privacy policy page, which is node 12 so I enclosed the adsense code in this:

    <xen:if is="{$forum.node_id} != 12">
    adsense code here
    </xen:if>

    I have also tried:

    <xen:if is="{$page.node_id} !=12">
    adsense code here
    </xen:if>

    However the ads still appear in my privacy policy page.

    What do I need to change? Please be specific as I am new to XenForo
     
  2. Adam K M

    Adam K M Active Member

    In the page template, try putting the following code:
    HTML:
    <xen:if is="{$page.node_id} != 12">
    {$page.node_id}
    </xen:if>
    See if that displays anything, if it does, then your node_id value is not 12.
     
  3. trman

    trman Active Member

    It is definitely 12, I can hover my pointer over the link in the node manager and it shows 12.

    Still not able to prevent the ads from appearing at the top of my privacy policy.
     
  4. SneakyDave

    SneakyDave Well-Known Member

    Do you have templates parsed as files, or perhaps some caching mechanism that may be using an old version of the template?

    I have this issue randomly, and sometimes need to restart the webserver, or turn off the option to store templates as files when I'm making some changes.

    Are you sure you are changing the correct template for the style you have enabled?
     
  5. trman

    trman Active Member

    Thanks for your reply.

    I do have templates as files, however other changes I make in the ad templates show up immediately.

    Yes, it is the correct template, it is the ad_above_top_breadcrumb template. I can remove the ad code completely and the ads will stop showing up right away for all the forum and pages. When I put the code back in, the ads show up right away. However I can not exclude them from the privacy policy (and other page nodes, like terms of use)
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Try
    Code:
    <xen:if is="{$quickNavSelected} != 'node-12'">
     
    Tracy Perry, Adam K M and SneakyDave like this.
  7. trman

    trman Active Member

    woo hoo, that did it!

    Thanks Brogan
     
    SneakyDave likes this.

Share This Page