You need to login to send post. No account yet? Create one:
Create account
Duplicate page title when is used pager of Drupal View
Fri, 02/05/2010 - 23:29
It is actually not web design but SEO problem.
Pager in Drupal's View is not generate the new node, but is only adding '?page=1' to address. It causes problem in Google search, because Google shows the duplicate title error (the same title in the different pages). The best resolution is a small php snippet in page.tpl.php file in your theme folder:
Change:
<title><?php print $head_title; ?></title>
To:
<title><?php
if (isset($_GET['page'])) {
$page = (int) $_GET['page'] + 1;
if ($page > 1) {
$head_title .= t(' - Page ').$page;
}
}
print $head_title; ?></title>
Done :-)
Title will appear with '- Page 2' ... 'Page X' suffix.


















