XF 1.2 Ad Code on 10th Post in a Thread but Code in Header

akia

Well-known member
I'm currently using:
Code:
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 10>
to display a banner on the 10th post in a thread. which works fine.

The problem I've got is not all threads have more than 10 posts in them, and I need something that I can use in the head of the page to wrap around the code that calls the ad, as I don't want to inflate my impressions where I've called for a ad but its not been displayed because there are only 5 posts in a thread.

Is there a conditinal tag that I can use if there are more than 10 posts per page?

I've tried
Code:
<xen:if is="{$contentTemplate} == 'thread_view' AND {$post.position} % {$xenOptions.messagesPerPage} == 10>

but that dosn't work.
 
Back
Top Bottom