XF 2.3 How do I add the forum name to thread titles?

Stuart Wright

Well-known member
Licensed customer
ChatGPT (confidently) told me to add this in to PAGE_CONTAINER
Code:
<xf:if is="$template == 'thread_view' && $forum">
    <xf:title><xf:title /> | {$forum.Node.title}</xf:title>
</xf:if>
before
Code:
<title><xf:title formatter="%s | %s" fallback="{$xf.options.boardTitle}" page="{$pageNumber}" /></title>
but annoyingly and predictably, it doesn't change anything.
How do I add the forum name to thread titles please?
Thanks
 
How do I add the forum name to thread titles please?
Do you want to add it on thread view? If that is a yes, find this code: at the thread_view template

HTML:
<xf:h1>{{ prefix('thread', $thread) }}{$thread.title}</xf:h1>

And replace it with this:

HTML:
<xf:h1>{{ prefix('thread', $thread) }}{$thread.title} - {$thread.Forum.Node.title}</xf:h1>

That will add the forum title at the end of the thread titles. Hope it helps.
 
Back
Top Bottom