XF 2.0 isFirstPost()

AndrewSimm

Well-known member
I replace
HTML:
</article>
with the below code. Everything works as intended; however, I want to put the ad position under the first post on each thread, not just the first post on the first page. Any ideas?

Code:
    </article>
<xf:if is="$post.isFirstPost()">
    <div class="cis_first_post_ad">
        <xf:ad position="ads_position_below_first_post" />
    </div>
</xf:if>
 
$post.isFirstPost() only returns true for the first post of a thread. You'd want something like ($post.position % $xf.options.messagesPerPage) == 0.
 
Back
Top Bottom