XF 1.5 Which template to use to insert photo above the breadcrumbs in thread view?

Stockwalker

Active member
I have a photo I would like to include in every thread view, above or below the breadcrumb. How do I achieve that?
 
Last edited:

Steve F

Well-known member
You can use the ad_above_top_breadcrumb template and a conditional.

https://xenforo.com/community/resources/conditional-statements.1604/

Mainly this conditional.
Code:
<xen:if is="{$contentTemplate} == 'thread_view'">

</xen:if>
Example:
Code:
<xen:if is="{$contentTemplate} == 'thread_view'">
<div style="width: 728px; height: 90px; background: #428bca; margin: 0 auto; color: #fff; line-height: 90px; text-align: center; ">LEADERBOARD</div>
</xen:if>
upload_2017-3-19_8-44-48.png
 

Stockwalker

Active member
You can use the ad_above_top_breadcrumb template and a conditional.

https://xenforo.com/community/resources/conditional-statements.1604/

Mainly this conditional.
Code:
<xen:if is="{$contentTemplate} == 'thread_view'">

</xen:if>
Example:
Code:
<xen:if is="{$contentTemplate} == 'thread_view'">
<div style="width: 728px; height: 90px; background: #428bca; margin: 0 auto; color: #fff; line-height: 90px; text-align: center; ">LEADERBOARD</div>
</xen:if>
View attachment 150014
ur awesome
 

Stockwalker

Active member
am I supposed to put that into
<xen:hook name="ad_thread_view_above_messages" here />
or outside that function? I tried outside; didnt work
 

Stockwalker

Active member
If I don't put it into the conditional statement, it works, but doesn't display where I want it to. So it's definitely your code that's bad.
 

Stockwalker

Active member
I don't mind. But I tried adding it both above and below the hook, and it does not display at all. Meanwhile, if I don't put it into your conditional, it shows up. so I guess whats wrong?
 
Top