XF 2.0 How to remove thread prefix link

Fastline

Active member
So i created some thread prefixes and it works well. The only issue is the prefix has a link. How to disable that?
 
To keep the prefix, but remove the link that leads to the filtered results page, access the "thread_list_macros" template. At line 91, you'll see:

<a href="{{ link('forums', $forum, {'prefix_id': $thread.prefix_id}) }}" class="labelLink" rel="nofollow">{{ prefix('thread', $thread, 'html', '') }}</a>

Remove the link HTML from this line, so the result is:

{{ prefix('thread', $thread, 'html', '') }}

And that's all you need to do. You'll see that the once active link on the forums page is no longer active.

Hope this helps.
 
Sorry, my bad, it was on line 130 because some extension changed the template.

Works great other than the fact I use a no color prefix and it still underlines it on hover but no more link.
 
Back
Top Bottom