
[SOLVED] How to don't print out identical title and sitename
[SOLVED] How to don't print out identical title and sitename
Hi all, my question is obvious from my subject, I think. I'm printing out "title | sitename" to my web title, but I wouldn't like to print out both of them when title is the same as sitename. In this case want get out only "sitename". How could I do it? Thanks 

Last edited by pustofkj on Tue Mar 29, 2011 5:15 am, edited 1 time in total.
Re: How to don't print out identical title and sitename
Several ways to do it..
The easiest way would be to replace the {title} | {sitename} with
A cleaner way would be to define a one-liner content block called 'alt_title' where the content editor can override any page he/she wishes without needing to modify a template. Similar logic would have to be in the template, but would be using $alt_title instead of $page_alias.
The easiest way would be to replace the {title} | {sitename} with
Code: Select all
{if $page_alias == 'home'}
<title>{* put something else here *}</title>
{else}
<title>{title} | {sitename}</title>
{/if}