XF 1.2 Meta title of a thread

Alexey.P

Member
Hi,

I have noticed that on my forum (even in here at Xenforo Community forum) the same meta title is every where, not only the homepage of the forum..

Even while creating the thread it is with home page meta title:
<title>Create Thread | XenForo Community</title>

My question is,
How is it possible to keep this only at the forum homepage and in the threads/conversations or in fact any where else -> without it?

Examples:
1. Xenforo with the homepage title inside a thread:
http://xenforo.com/community/threads/template-modifications-and-comparison.48412/
<title>1.2 - Template Modifications and Comparison | XenForo Community</title>

2. DigitalPoint without the homepage title inside a thread:
https://forums.digitalpoint.com/threads/bing-vs-google.2668511/
<title>Bing Vs. Google?</title>

Same on
http://admin-talk.com/threads/forums-dying.43694/

And others..

I only want to have the thread title in the page meta title...
 
Edit it out of the <title> attribute in (I believe) the PAGE_CONTAINER template. If you want it on the homepage, modify the <xen:title> tag and add it back in on the forum_list template.
What do you mean if I want it on the homepage, want what?

Btw,
This is what I see on PAGE_CONTAINER:
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

I tried to keep it:

<title><xen:if is="{$title}">{xen:raw $title} </title>

And I get an error:
The following templates contained errors and were not saved: PAGE_CONTAINER: 1) Line 42: Template syntax error.
 
Change it to this:
Code:
<title><xen:if is="{$title}">{xen:raw $title}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

That is set via the <xen:title> tag (documentation linked in my previous post). Actually, you may not need to set it on the forum home, its probably already done like that.

And you can't leave an unclosed <xen:if> tag in your template.
 
Change it to this:
Code:
<title><xen:if is="{$title}">{xen:raw $title}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

That is set via the <xen:title> tag (documentation linked in my previous post). Actually, you may not need to set it on the forum home, its probably already done like that.

And you can't leave an unclosed <xen:if> tag in your template.
So some thing like that:

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

Also,
How can I keep the homepage meta title at forum/node pages? (not threads).
 
I'm not sure what you are asking?

The code I provided will remove " | XenForo Community" from all pages unless no specific page title is defined, and then it replaces it with "XenForo Community".
 
I'm not sure what you are asking?

The code I provided will remove " | XenForo Community" from all pages unless no specific page title is defined, and then it replaces it with "XenForo Community".
I meant in the forum it self, for example:
http://xenforo.com/community/forums/xenforo-questions-and-support.25/
<title>XenForo Questions and Support | XenForo Community</title>

After editing the PAGE_CONTAINER it will remove the " | XenForo Community", but I do want to keep it inside the forums it self (just not the threads).
 
This works great and was exact what I was looking for too :) Is there any chance this can be put in the EXTRA.CSS so we don't have to edit this on forum update? if so, how can this be done.
 
You can't use HTML code in CSS templates.

You won't necessarily have to edit the template again when upgrading - if it is outdated, you will have the option to merge, which should handle it automatically.
 
Back
Top Bottom