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

XF 1.5 Notice on first page of threads list

Discussion in 'XenForo Questions and Support' started by ftsservice, Sep 18, 2016.

  1. ftsservice

    ftsservice Active Member

    I need to show a notice only in a specific forum's thread list, and only on the first page of the threads list. I've searched the forums and resources, and can't find how to do this.
  2. Mike

    Mike XenForo Developer Staff Member

    There wouldn't be a condition that would do this for a notice. You could potentially do this with a direct template edit and conditionals, though it won't work like a true notice (dismissability, display, etc).
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Like Mike said, a template edit can be used. It's crude but it works:

    Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

    Add the red code:

    			<xen:if is="{$sidebar}">
    				<div class="mainContainer">
    					<div class="mainContent"></xen:if>
    						<xen:include template="ad_above_top_breadcrumb" />
    						<xen:if is="{$requestPaths.requestUri} == '/index.php?forums/main-forum.2/'">
    							<p class="importantMessage">
    						<xen:hook name="page_container_breadcrumb_top">
    						<div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
    							<xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
    							<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
    						<xen:include template="ad_below_top_breadcrumb" />
    If you use friendly URLs then it won't have the index.php part.
    Steve F likes this.

Share This Page