XF 1.2 How to insert a single line content between thread search result?

rdn

Well-known member
For:
  • New Post
  • Keyword Search
  • Watched Threads List
I tried: hook:thread_list_item_icon_key
But it's show's in all thread.
I want to show it once, Thanks!
 
What are you trying to accomplish? If you are using templates (pre-compiled) you could do:

Code:
<xen:if is="!$shown">
  <xen:set var="$shown" value="true" />
  <!-- show your content -->
</xen:if>

That should only show once.
 
Just like using this template: ad_thread_list_below_stickies
Content will be shown below stickies.

But with hook:thread_list_item_icon_key, I want to show it below the 1st thread/result.
 
Code:
<xen:set var="$shown" value="false" />
<xen:if is="{$shown} == true">
  <xen:set var="$shown" value="true" />
  <!-- show your content -->
</xen:if>

(untested, but a variation of that should work)
 
  • Like
Reactions: rdn
Back
Top Bottom