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

XF 1.1 Display part of notice only on single page

Discussion in 'XenForo Questions and Support' started by Gladius, Feb 14, 2012.

  1. Gladius

    Gladius Well-Known Member

    What would be the best/easiest way of making a part of a global notice show only on forumhome (whatever the XF equivalent is called).

    Basically, I've got a two-part notice text. 1st part shows on all pages, but I want the second part to only show on the main forum listing page.

  2. Brogan

    Brogan XenForo Moderator Staff Member

    Create two notices.

    Show the first one on all pages.
    Show the second one on the forum_list template only.
  3. Gladius

    Gladius Well-Known Member

    Thanks but that's not what I asked, I expressly need this to be in a single notice and not split over two notices.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> EXTRA.css

    Add this code:

    	display: none;
    .forum_list .indexOnly
    	display: block;
    Then edit your notice and surround the conditional content with a div:

    <div class="indexOnly">
  5. Gladius

    Gladius Well-Known Member

    Thanks, that works nicely on the user level, but the problem is that the text and links still remain crawlable, just hidden from sight. This is an ad I'm inserting and it must not appear on any other page except the main one. So I need to hide it from sight as well as make sure that the ad code does not remain visible to search engines. Is there a way around this?
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I can't find a way to do that without an addon. :(

Share This Page