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

XF 1.5 Add category name in thread title

#1
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
 

Brogan

XenForo moderator
Staff member
#2
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.
 
#3
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: