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

Discussion in 'Styling and Customization Questions' started by Ghostaunt, Sep 11, 2015.

  1. Ghostaunt

    Ghostaunt Active Member


    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

  2. Brogan

    Brogan XenForo Moderator Staff Member

    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. Ghostaunt

    Ghostaunt Active Member

    I have already try to replace :
    <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
    <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

    Last edited: Sep 11, 2015
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I think only the parent node ID is available, not the name.
  5. Ghostaunt

    Ghostaunt Active Member

    For the SEO it's not very good... :(
    I'm trying to find a way

Share This Page