Hi,
I want to change the html title tag for tagged entries. All of the different tag pages in /plugin/tag/taggedkeyword have the blog name in the title tag. I do not want to have the blog's title on these pages. I simply want "Entries tagged as taggedkeyword"
How can I do this? Thanks.
Freetag Title Tags
-
kharri1073
- Regular
- Posts: 15
- Joined: Tue May 09, 2006 6:01 pm
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Freetag Title Tags
Hi!
You need to edit your index.tpl template file and replace
with
HTH,
Garvin
You need to edit your index.tpl template file and replace
Code: Select all
<title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
Code: Select all
{if $CONST.PLUGIN_VARS_TAG != ''}
<title>{$head_subtitle}</title>
{else}
<title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
kharri1073
- Regular
- Posts: 15
- Joined: Tue May 09, 2006 6:01 pm
- Contact:
Code: Select all
{if $CONST.PLUGIN_VARS_TAG != ''}
<title>{$head_subtitle}</title>
{else}
<title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
{/if}I see. Try this:
Code: Select all
{if $CONST.PLUGIN_VARS_TAG != ''}
<title>{$head_subtitle|@default:$head_title|@default:$blogTitle}</title>
{else}
<title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
{/if}
-
kharri1073
- Regular
- Posts: 15
- Joined: Tue May 09, 2006 6:01 pm
- Contact:
-
kharri1073
- Regular
- Posts: 15
- Joined: Tue May 09, 2006 6:01 pm
- Contact:
-
kharri1073
- Regular
- Posts: 15
- Joined: Tue May 09, 2006 6:01 pm
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
When you view "Tags", you don't have a category. So in this case, the ELSE-Condition of the if statement in your template file should already take care of it.
What's your URL so that we can see iT? And how does your index.tpl file look like right now in the head section?
Regards,
Garvin
When you view "Tags", you don't have a category. So in this case, the ELSE-Condition of the if statement in your template file should already take care of it.
What's your URL so that we can see iT? And how does your index.tpl file look like right now in the head section?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
kharri1073
- Regular
- Posts: 15
- Joined: Tue May 09, 2006 6:01 pm
- Contact:
http://www.ammoland.com/
An example of my concern is any of the categories in the left hand side. http://www.ammoland.com/categories/7-Accessories
I added a little bit to the end for pagenation at the end of the title. I tried the code supplied above without my code for the pagenation and i still was unable to see the title of the category in the title tag.
An example of my concern is any of the categories in the left hand side. http://www.ammoland.com/categories/7-Accessories
Code: Select all
{if $CONST.PLUGIN_VARS_TAG != ''}
<title>{$head_subtitle|@default:$head_title|@default:$blogTitle}{if $footer_currentPage != 1 && $entry_id != true} | Page {$footer_currentPage}{/if}</title>
{else}
<title>{$head_title|@default:$blogTitle}{if $head_subtitle} - {$head_subtitle}{/if}{if $footer_currentPage != 1 && $entry_id != true && $staticpage_content == ''} - Page {$footer_currentPage}{/if}</title>
{/if}
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Hm, usually in category view the name of the category should be a part of. For category view, inside index.php this code exists:
which puts the category name into what will later be $head_title.
You can try to access {$category_info.category_name} directly and put it iside the title tag though?
Regards,
Garvin
Hm, usually in category view the name of the category should be a part of. For category view, inside index.php this code exists:
Code: Select all
$serendipity['head_title'] = $cInfo['category_name'];
$serendipity['head_subtitle'] = $serendipity['blogTitle'];
You can try to access {$category_info.category_name} directly and put it iside the title tag though?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/