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

XF 1.5 Conditionals posts per page

Discussion in 'Styling and Customization Questions' started by OrlandoTiger, Aug 26, 2016.

  1. OrlandoTiger

    OrlandoTiger Member

    I am currrenly using the following code to display an ad after the 3rd post if there are over 5 replies to the post.

    How would I modify this to a per page post count instead of the entire thread?

    I only want the ad to show if there are more than 5 posts per page, and not in the total thread.

    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 2 AND {$thread.reply_count} > 5">
     
    Last edited: Aug 26, 2016
  2. OrlandoTiger

    OrlandoTiger Member

    Found the solution...

    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 2 AND {$thread.reply_count} > 5 AND {xen:count $posts} > 5">
     

Share This Page