View Full Version : How to get the meta title to display sitename and link topic
Christoffer Bol
05-07-2006, 07:44 PM
Hello
Can anyone tell me how to get the meta title to display like this, when exploring categories:
Site.com - Categoryname
And when exploring a link (link details)
Site.com - Linkname
Well there is two places you can control that.
First in admin panel:
Go to:
Configuration
General Configuration
You'll then see:
Site title
Suffix for page titles
fill in what you want in those 2.
And if you want to flip flop those try:
In header.tpl find:
<title>{$title}{$config.suffix}</title>
And change the order of {$title} and {$config.suffix}
Christoffer Bol
05-07-2006, 11:07 PM
Thanks :) But now is the sitename only displayed at index..
I want sitename, then subpages.. Like this:
Site.com - New Links
If i add sitename before $title in header.tpl... then its displaying duplicate of the site name... How would it be to rebuild the title thing in index.php?
Simon Gooffin
05-08-2006, 09:51 AM
Hi
Do you have this functionality enabled?
admin panel->configuration->general configuration
Full path to category in title should be enabled
Christoffer Bol
05-08-2006, 09:57 AM
I just found this under general config:
Enable path field for categories
Simon Gooffin
05-08-2006, 09:59 AM
I enabled this now:
Enable path field for categories
But nothing happens
not
Enable path field for categories
You should enable
Full path to category in title
Christoffer Bol
05-08-2006, 10:01 AM
Yes i know, but its not in my general config.. maybe its in the pro version
Simon Gooffin
05-08-2006, 10:08 AM
Ahh, I did not know you have free version. yes, this functionality is already built in our pro version
Christoffer Bol
05-08-2006, 10:11 AM
Ok :) Im going to buy it later! Trust me ;)
How should this lines look like to not get duplicate sitename in title if i add sitename before $title in header.tpl?
Talking about on index page... index.php
$title = ($category['id'] > 0) ? $category['title'] : $gDirConfig['site'];
$gDirSmarty->assign_by_ref('title', $title);
Simon Gooffin
05-08-2006, 10:40 AM
actually there is no need for you to change template
there are two options in your admin panel configuration
Site title - title for your index page
Suffix for page titles - added to the end of every page title
So just set appropriate values and that's all
Christoffer Bol
05-08-2006, 10:51 AM
You dont understand :)
I want the title to look like this on every page:
Mysite.com - Title of subpage
Example:
Mysite.com - New Links
Mysite.com - Electronics
Mysite.com - Contact Us
And the index page making problems becouse the title of that page it the sitename so it looks like this on index:
Sitename.com - Sitename.com
Got it? :P
Simon Gooffin
05-08-2006, 12:23 PM
please carefully read Greg's advice. It's exactly what you are trying to achieve then:
And change the order of {$title} and {$config.suffix}
Christoffer Bol
05-08-2006, 12:47 PM
I tried that, and added sitename in suffix field in general config.
Then the titles are going like this:
Sitename.com - New LinksSitename.com
Am i stupid or what... haha
And if i change the order of title and suffix its going to display bakwards..
New Links - Sitename.com
Simon Gooffin
05-08-2006, 01:08 PM
Ahh, I suppose I know what confused you. Your other pages except New Links should be displayed fine
*** open new-links.php and find this code 1***
/** defines page title **/
$gDirSmarty->assign('title', $gDirLang['new_links'].$gDirConfig['suffix']);
*** change it to the following ***
/** defines page title **/
$gDirSmarty->assign('title', $gDirLang['new_links']);
*** save changes ***
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.