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

XF 1.1 Conditional for forumlist?

Discussion in 'XenForo Questions and Support' started by Claudio, Aug 24, 2012.

  1. Claudio

    Claudio Well-Known Member

    I want to display an ad on the forum_list template only, so I would like to know which is the conditional to avoid this ad to be shown in other templates like thread_view and thread_list.

    By the way...I´m displaying the ads on the sidebar and I have integrated the sidebar into both thread templates.
  2. MichaelDance

    MichaelDance Well-Known Member

    Edit the node_list template.

    so its like:

    <xen:require css="node_list.css" />
    Advert code here
    <xen:if hascontent="true">
        <ol class="nodeList sectionMain" id="forums">
            <xen:foreach loop="$renderedNodes" value="$node">{xen:raw $node}</xen:foreach>
        <xen:if is="{$newDiscussionButton}"><div class="nodeListNewDiscussionButton">{xen:raw $newDiscussionButton}</div></xen:if>
  3. Claudio

    Claudio Well-Known Member

    I´m displaying the ads on the sidebar...

    is just that I´m using the sidebar in thread_view and thread_list and I don´t know which conditional I should set to display X ad only on forum_list
  4. MichaelDance

    MichaelDance Well-Known Member

    it will only need to be edited on forum_list i believe.
  5. Claudio

    Claudio Well-Known Member

    I don´t know if you understand...I´ll give an example.

    Sidebar has this code:

    And I want to have this code on the sidebar template:

    Now do you understand what conditional I need?
  6. MichaelDance

    MichaelDance Well-Known Member

    Sorry I misread try:

    <xen:if is="{$contentTemplate} == 'forum_list'">
    Advert here.
    Jake Bunce likes this.

Share This Page