Hello!
My default landing page is actually a view. So when you type in the site address, www.example.com, the view is displayed with the title of the view in the browser's title bar which doesn't reflect the actual home page title of a site.

This is bad from an seo perspective. How do can I do these:

The heading of the view should still indicate what the view is about but,
The browser page title should actually indicate what the site is about since this view is also the landing page

Any pointers greatly appreciated!

Comments

drupalzack’s picture

anyone?

Is it programatically possible to set a views title to be different from the browser page title for that view?

pbarnett’s picture

Hi!

I think the page title shown in the browser is derived from the view title by drupal; having said that, you could always change a specific page title using str_replace on $head_title in your themes page.tpl.php file (assuming you're using a phptemplate-based theme).

Pete.

cameron tod’s picture

You can just put something like the snippet below in your template.php:

<?php

if ( drupal_is_front_page() ) {

 drupal_set_title('Whatever title you want');

}
?>