Noindex and nofollow

Главная » Blog » Noindex and nofollow

There is a web site (e-commerce) dasmebel. It works on Drupal 6 with Ubencart. I was asked to make seo audit with this project. I had difficulties with pager, which I needed to conclude pager into noindex, except number pages.To do this, I made next steps:

  1. Open file includes/pager.inc
  2. Around 400-404 string there is code,
    which generate links. Note to l() function. After some small manipulations and testing of numbers/strings, I have this code
if (isset($titles[$text])) {
$attributes['title'] = $titles[$text];
return ''.l($text, $_GET['q'], array('attributes' => $attributes, 'query' => count($query) ? implode('&', $query) : NULL)). '';
}
else if (is_numeric($text)) {
$attributes['title'] = t('Go to page @number', array('@number' => $text));
return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => count($query) ? implode('&', $query) : NULL));
}

Подписаться на рассылку

Будьте в курсе - получайте последние статьи на свой email

Ваша подписка успешно оформлена

Pin It on Pinterest

Share This