Fix Blogger post and page titles

Now that Google finally begun indexing this site, I remembered the page <title>'s. And that they are not to my liking in Blogspot.



Default Blogger page titles are like this:





main page: YourBlogTitleWhichCanBeVeryLongInSomeCases





a page: YourBlogTitleWhichCanBeVeryLongInSomeCases: A Page





a post page: YourBlogTitleWhichCanBeVeryLongInSomeCases: A Post




archive page: YourBlogTitleWhichCanBeVeryLongInSomeCases: September 2011




Imagine those titles in Google search, or better still, on browser tabs or operating system's taskbar. Hard to differentiate one from the other! Better titles would be, at least I think:





main page: YourBlogTitleWhichCanBeVeryLongInSomeCases





a page: A Page | YourBlogTitleWhichCanBeVeryLongInSomeCases





a post page: A Post | YourBlogTitleWhichCanBeVeryLongInSomeCases




archive page: September 2011 | YourBlogTitleWhichCanBeVeryLongInSomeCases






This way the important information is first. Luckily the fix is simple: Edit template html. Find line:





<title><data:blog.pageTitle/></title>





and replace it with:






<b:if cond='data:blog.pageType == &quot;index&quot;'> 


  <title><data:blog.pageTitle/></title> 


<b:else/> 


  <title><data:blog.pageName/> | <data:blog.title/></title> 


</b:if>






Save template and test. Now index-type (index and search) pages keep old titles, others get new titles. You can use other characters instead of   |  there, and more characters than one, too. If you could not make it, please read know your way around.