XF 2.0 How would I get code to display at top of these 2 templates?

Alien

Well-known member
Hey, could someone help me out on this one?

I need to put the below conditional somewhere, to display a custom template (a content box) I made on both forum_view and thread_view...

Where would I place this to accomplish that? I used to use the ad_above_content template in 1.x. No idea where to put it...

<xf:if is="$template == 'thread_view' OR $template == 'forum_view'">
MY CODE HERE
</xf:if>

Thanks!
 
@jamalfree @Bryan Thank you guys so much, I now have it working to display two custom-built boxes with content in them for 2 specific forums! Perhaps I'll convert the PAGE_CONTAINER inserts into a template modification for easier upgrades.

@Steve F If I did something similar like this in the future, does the ad system allow for SPECIFIC nodes to display in? Or would I just use conditional code within the html to force that?
 
Yea you can use the conditionals in the HTML field.

Such as:
Code:
<xf:if is="{$forum.node_id} == 8">
    <div class="testMessageBanner" style="margin: 10px auto; display: block; width: 250px; height: 95px;"> Show content..</div>
</xf:if>
 
Back
Top Bottom