XF 1.4 Ad Template Conditional


Active member
Im using this conditional in ad_message_below

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 OR {$post.position} % {$xenOptions.messagesPerPage} == 4 OR {$post.position} % {$xenOptions.messagesPerPage} == 9 OR {$post.position} % {$xenOptions.messagesPerPage} == 15">

For some reason this change seems to be making my adsense in ad_below_bottom_breadcrumb dysfunctional. I get the spacing for the ad but no add showing.

If I remove everything at OR and after in the conditional then my ad in ad_below_bottom_breadcrumb works fine. So I must suck at writing the conditionals. Anyone?


XenForo moderator
Staff member
That conditional statement shouldn't affect the other template.

It's possible you have malformed code somewhere or your other template code is incorrect.


Active member
Thanks for the response. It sure seems to be the conditional though because If I shorten it to

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 OR {$post.position} % {$xenOptions.messagesPerPage} == 4">

Then the ad in ad_below_bottom_breadcrumb shows fine. Very strange.


Active member
Oh well. I'll just leave it with two ads for now. Works fine that way, maybe the universe is telling me not to have so many ads.