Making a separator in your page title to not show up on the front page in Drupal

By divider I mean the '|' that I currently have on my site's titlebar. Now, this is all fine, to have $site_name and $title appear with a | separator, but It kind of looks weird on the front page when there is no page title.

It's pretty easy to just have it called differently when you are using page-front.tpl.php, but my site doesn't use a separate template file for the front page, so why should I have to make one for just this?

I've been using an if else statement to check $if_front and then display the separator, title and site name or else to show just the site name. Alternatively you could just check if there is a title and do it that way.

<title>
<?php 
if ($is_front) {
	print $site_name; 
} else {
	print $title . t(' | ') . $site_name; 
}
?>
</title>

This seems to work well for me, thoughts?