S Stockwalker Active member Mar 19, 2017 #1 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: Mar 19, 2017
I have a photo I would like to include in every thread view, above or below the breadcrumb. How do I achieve that?
Steve F Well-known member Mar 19, 2017 #2 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> Upvote 0 Downvote
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>
S Stockwalker Active member Mar 19, 2017 #3 Steve F said: 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 Click to expand... ur awesome Upvote 0 Downvote
Steve F said: 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 Click to expand... ur awesome
S Stockwalker Active member Mar 19, 2017 #5 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 Upvote 0 Downvote
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
Steve F Well-known member Mar 19, 2017 #6 You would put it below that. You will only see it when viewing a tread. Upvote 0 Downvote
S Stockwalker Active member Mar 19, 2017 #7 I know, but not working. Here: http://imgur.com/a/OEuh1 Upvote 0 Downvote
Steve F Well-known member Mar 19, 2017 #8 Stockwalker said: 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 Click to expand... I don't think that conditional works in that template...I tried and it does not work. Upvote 0 Downvote
Stockwalker said: 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 Click to expand... I don't think that conditional works in that template...I tried and it does not work.
S Stockwalker Active member Mar 19, 2017 #9 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. Upvote 0 Downvote
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.
Steve F Well-known member Mar 19, 2017 #10 Or your understanding of my posts. Do you want it above or below the breadcrumb? Upvote 0 Downvote
S Stockwalker Active member Mar 19, 2017 #11 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? Upvote 0 Downvote
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?
Steve F Well-known member Mar 19, 2017 #12 You're in the wrong template.... re-read my post (#8) Upvote 0 Downvote
Steve F Well-known member Mar 19, 2017 #14 Personally I would use the ad_below_top_breadcrumb template as it looks better. Upvote 0 Downvote