Does anyone know a conditional I could use that will display x info after every x posts or after the first post in a thread? I really need this so I can display some info within threads for guests. Any ideas? Thank you :wink:
The variable $post['post']['post_count'] in the topicViewTemplate holds the value of which post in the topic that particular post is. So to have something show up after the first post, you'd have a conditional like this: Code: <if test="$post['post']['post_count'] == 1"> show something </if> To have something repeat after X number of posts, do this: Code: <if test="$post['post']['post_count'] % X == 0"> show something </if> Just replace X with the number of posts you want to show before doing this. And remember, this code goes into the topicViewTemplate right before the first </foreach> tag, as that's where it does the loop over each post to show.
Thanks for those Michael, do you know of any list containing commonly wanted ones thats available anywhere?