Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Maccsta
Regular
Posts: 77 Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England
Post
by Maccsta » Sat Apr 17, 2010 7:09 pm
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.
yellowled
Regular
Posts: 7111 Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:
Post
by yellowled » Sun Apr 18, 2010 10:12 am
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