V Veer Well-known member Apr 14, 2011 #1 Hi, just needed little info related to the template syntax / conditionals I need to show some content in the first post in a thread, not only the first post but all pages too, all pages of a thread? Thanks.
Hi, just needed little info related to the template syntax / conditionals I need to show some content in the first post in a thread, not only the first post but all pages too, all pages of a thread? Thanks.
P Paul B XenForo moderator Staff member Apr 14, 2011 #2 Do you mean after the first post or in the first post? This is the conditional for after the first post: <xen:if is="{$post.position} == 0"> This content will show after the first post </xen:if> Replace the first line with this for every page: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0"> Upvote 0 Downvote
Do you mean after the first post or in the first post? This is the conditional for after the first post: <xen:if is="{$post.position} == 0"> This content will show after the first post </xen:if> Replace the first line with this for every page: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
V Veer Well-known member Apr 14, 2011 #3 I need to show in the first post on all thread pages. Upvote 0 Downvote
P Paul B XenForo moderator Staff member Apr 14, 2011 #4 In that case, edit the ad_message_body template and add the following code: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0"> Your content </xen:if> Upvote 0 Downvote
In that case, edit the ad_message_body template and add the following code: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0"> Your content </xen:if>
V Veer Well-known member Apr 15, 2011 #6 Brogan said: In that case, edit the ad_message_body template and add the following code: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0"> Your content </xen:if> Click to expand... There's a problem, the content within the above code displays also on Conversation pages, that's irritating. How to fix it? Upvote 0 Downvote
Brogan said: In that case, edit the ad_message_body template and add the following code: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0"> Your content </xen:if> Click to expand... There's a problem, the content within the above code displays also on Conversation pages, that's irritating. How to fix it?
P Paul B XenForo moderator Staff member Apr 15, 2011 #7 Try this: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}"> Upvote 0 Downvote
Try this: <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">