• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Editing the "new thread" template

Dan Hawkins

Active member
#1
Hi All,

I'm trying to add a "new" prefix to threads in the thread list overview.. I can't find the template - can anyone point me in the direction?

Basically I want to create this:
1512497819014.png

I know the HTML code to do this - but I want to add "NEW" after the prefix - but before the thread title - ONLY to new threads.

Any points would be greatly appreciated.

Dan
 

M@rc

Well-known member
#2
The template is thread_list_macros.
Code:
              <xf:if is="$thread.prefix_id">
                    <xf:if is="$forum">
                        <a href="{{ link('forums', $forum, {'prefix_id': $thread.prefix_id}) }}" class="labelLink">{{ prefix('thread', $thread, 'html', '') }}</a>

                    <xf:else />
                        {{ prefix('thread', $thread, 'html', '') }}
                    </xf:if>
              </xf:if>
 

Dan Hawkins

Active member
#3
The template is thread_list_macros.
Code:
              <xf:if is="$thread.prefix_id">
                    <xf:if is="$forum">
                        <a href="{{ link('forums', $forum, {'prefix_id': $thread.prefix_id}) }}" class="labelLink">{{ prefix('thread', $thread, 'html', '') }}</a>

                    <xf:else />
                        {{ prefix('thread', $thread, 'html', '') }}
                    </xf:if>
              </xf:if>
^ Kudos to @M@rc - really helped me nail the NEW icon.

Thank you very much!