XF 2.1 Modify prefix_input only when creating new thread

nrep

Well-known member
I've edited the prefix_input template so that it selects a default prefix based on user criteria, however I only want this to occur when creating a new thread - not when editing a thread title.

I tried editing the prefix_input template as follows:

Code:
<xf:if is="$template == 'forum_post_thread'">

[custom prefix code here]

<xf:else />
    $0
</xf:if>

However, this doesn't work - it doesn't think I'm posting from the "forum_post_thread" template. Is there another way to identify when a new thread is being posted?
 
Code:
<xf:if is="$xf.reply.template == 'forum_post_thread'">

[custom prefix code here]

<xf:else />
    $0
</xf:if>
 
Top Bottom