Creating Unique Blog Titles For Every Page

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Creating Unique Blog Titles For Every Page

Post by Maccsta »

Thanks to Gavin this is the code that will remove the site’s main page title from the end of every blog post title when added to the index template:

Code: Select all

<title>
{if $view == 'entry'}{$entry.title}
{else}
{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}
{/if}
</title>
However how do I implement the code to do the same for static pages and categories?

Also is it possible to make a custom title for each of the main pages e.g.
My Cool Blog – Page 2
My Cool Blog – Page 3
My Cool Blog – Page 4
So that none of the pages have exactly the same page title.

Thanks for any help. This would be useful for everyone’s blog titles.
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Creating Unique Blog Titles For Every Page

Post by yellowled »

Maccsta wrote:However how do I implement the code to do the same for static pages and categories?
I think I can help with that :)

Code: Select all

<title>
{if $view == 'entry'}{$entry.title}
{elseif $staticpage_pagetitle}{$staticpage_pagetitle}
{elseif $view == 'categories'}{$category_info.category_name}
{else}{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}
{/if}
</title>
That should do the trick for that part of your question.

YL
Post Reply