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

Adding "forum" to the end of each forum's title and h1

Discussion in 'XenForo Questions and Support' started by NeoCHI, Jun 15, 2013.

  1. NeoCHI

    NeoCHI Active Member

    Hi I need some help with adding the word "forum" to the end of each forum node's title and h1 (SEO purposes). I have it working but I realized I have one forum named "Game Forums" and after adding this it becomes "Game Forums Forum" which is obviously not desirable so I'm trying to use an "if" to avoid it.

    I'm trying to use the following code in "forum_view" template:

    <xen:if "{$forum.title}"="Game Forums">
    <xen:title>{$forum.title}{xen:helper pagenumber, $page}</xen:title>
    <xen:else />
    <xen:title>{$forum.title} Forum{xen:helper pagenumber, $page}</xen:title>
    <xen:h1>{$forum.title} Forum</xen:h1>

    But the if statement is causing an error when I try to save. I've also tried using the forum.node_id but it returns the same error. Can you someone tell me help me?
  2. Mike

    Mike XenForo Developer Staff Member

    Use this if:
    <xen:if is="{$forum.node_id} == 123">

    Changing the 123 as necessary.
    NeoCHI likes this.

Share This Page