XF 1.5 Add category name in thread title

Ghostaunt

Active member
Hello

Is it possible to add the category name in the thread title please ?
I would like it in the <title></title> like it :
THREAD_TITLE - CATEGORY NAME (not the parent forum name, but category) - BOARD TITLE

Thanks
 
It's not clear where you want it to show, but you can edit the template(s) and use {$forum.title} to display the forum name, if it's available.
 
I have already try to replace :
PHP:
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

By
PHP:
<title><xen:if is="{$title}">{xen:raw $title} | <xen:if is="{$contentTemplate} == 'thread_view'">{xen:raw $forum.title} |</xen:if> {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

But I dont want to forum parent name, but the category parent name.

Because I have categories for all games. Like that :
  • League of Legends (category)
    - Generals discussions (forum)
    - Tips/Builds (forum)
    - ...
Then I would like League of Legends in the title, when we are in a thread in generalas discussions, or all children, like that :
THREAD_TITLE - League of Legends - FORUM_TITLE

Thanks
 
Last edited:
Top Bottom