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

XF 1.5 Conditional - At least X messages per page

Russ

Well-known member
#1
So I'm showing content after the first post on every page, that's fine.

What I need to do as well is show additional content above the bottom page nav only if there's at least 1 reply (so that a single post thread won't show both ads)

This conditional works good inside thread_view template:

Code:
<xen:if is="{$thread.reply_count} > 0">
Except when you get to a page in a multi-paged thread where it has a single post on it. So is there an additional conditional to check if a page of the thread has at least 2 posts on it?

Problem:
Screenshot_1.png



Ideally how it should show:
Screenshot_2.png

Thanks... I'm awful with conditionals.
 

Chris D

XenForo developer
Staff member
#2
It'd just be something like this:
Code:
<xen:if is="{xen:count $posts} > 1">
That would show the ad if there is more than one post on the current page.