XF 1.5 How to check if in threadview via template code?

XFuser

Active member
Hello,

We are playing around with the Ad Code and noticed that the ad templates "ad_below_content" and "ad_thread_view_below_messages" get duplicated and are too close to each other when viewing threads and we prefer the placement of "ad_thread_view_below_messages" in threads. So, we do NOT want to display "ad_below_content" content ads when in thread view so that only the "ad_thread_view_below_messages" ad gets shown in threads.

How can we use template code to check if we are in a thread so we can fix this?

Also, what are other alternative solutions to this problem that we can consider?

Thank you.
 
Thank you, but we had already checked that resource and there were no conditional statements for "in threadview". How can this be accomplished using the conditional statements available?

Thank you, but we do not wish to use an add-on for this and are hoping there is a conditional statement available in the existing template code.
 
24. How can I show content on a specific page?
<xen:if is="{$contentTemplate} == 'xyz'">
This content will show on the xyz template
</xen:if>
Thank you. Your post about $contentTemplate lead us to this post which contained the specific answer we were looking for:
Code:
<xen:elseif is="{$contentTemplate} == 'thread_view'" />
We tested it and it works.
 
  • Like
Reactions: DL6
Back
Top Bottom