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

Conditional to hide content on a page?

Discussion in 'XenForo Questions and Support' started by CyclingTribe, Jan 23, 2013.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    I've checked the FAQ and couldn't see anything for this - I have created a page at the URL "/pages/advertise/" which displays my BuySellAds site details to potential advertisers - but I don't want ads shown on this specific page.

    Is there a conditional to exclude "pages"?

    Shaun :D
  2. MattW

    MattW Well-Known Member

    Would this not do it?

    EDIT: and then use the node_id of the page you just created?
  3. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks Matt, but no, none of those appear to work with pages.
  4. EQnoble

    EQnoble Well-Known Member

    replace 3 with the page node ID that you need to do something for or avoid doing something for..
    you need to wrap the second one around your ads

    if is
    <xen:if is="{$page.node_id} ==3">
        blah blah
    if is not
    <xen:if is="{$page.node_id} !=3">
        blah blah

    thought I would let you know...I could not find the opening body tag on any page in your site
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  6. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks (y) - I hadn't noticed, but somewhere along the line I've removed this line from the PAGE_CONTAINER template:

    <body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>
    Suffice to say it's back in there now ... ;)
  7. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks Jake - I tried that too but unfortunately it didn't work.

    I've removed the page for now and put a link under the ads instead. I'll revisit this again later on, it's not all that important. (y)

Share This Page