How to change <title> tag for home page only?

I know this is probably a stupid question, but honestly, I've looked around and couldn't find much. I'm running the newest stable version and using the default theme. In the search engines, my home page title shows up as just the forum name and I'd like to add a tagline to the <title> tag to make it stand out more.

What is the best way to do that?

Thanks!
 
I added the following to the forums list:

<xen:title>Forum Name - Tagline</xen:title>

It worked, but it put the forum name at the end, like:

Forum Name - Tagline | Forum Name

I want it to be:

Forum Name - Tagline
 
If you want a different title for the forums list "home" page - edit the PAGE_CONTAINER template and change the title coding from:

Code:
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

... to:

Rich (BB code):
<xen:if is="{$contentTemplate} == 'forum_list'">
    <title>CUSTOM TITLE HERE</title>
<xen:else />
    <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
</xen:if>

Then add your custom title in the highlighted section.

Cheers,
Shaun :D
 
If you want a different title for the forums list "home" page - edit the PAGE_CONTAINER template and change the title coding from:

Code:
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

... to:

Rich (BB code):
<xen:if is="{$contentTemplate} == 'forum_list'">
    <title>CUSTOM TITLE HERE</title>
<xen:else />
    <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
</xen:if>

Then add your custom title in the highlighted section.

Cheers,
Shaun :D

Old post but the method works just the same. Thank you
 
If you want a different title for the forums list "home" page - edit the PAGE_CONTAINER template and change the title coding from:

Code:
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

... to:

Rich (BB code):
<xen:if is="{$contentTemplate} == 'forum_list'">
    <title>CUSTOM TITLE HERE</title>
<xen:else />
    <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
</xen:if>

Then add your custom title in the highlighted section.

Cheers,
Shaun :D

Excellent - exactly what I was looking for. :)
 
There is a better way to do it IMO:

We set a new condition for title element:

Code:
    <title>
        <xen:if is="{$customTitle}">{xen:raw $customTitle}
        <xen:elseif is="{$title}" />{xen:raw $title} | {$xenOptions.boardTitle}
        <xen:else />{$xenOptions.boardTitle}</xen:if>
    </title>

In our content template we can use <xen:container> to set a custom title instead. So it'll be like this:

Code:
<xen:container var="$customTitle">My custom title</xen:container>

Don't forget to place it before <xen:title> tag.
 
It seem like <xen> has been replaced with <xf>?

In any case I also would like to have a home page title tag in version 2.1 in the format google prefers:

{Board Name}: Description
 
Back
Top Bottom