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));
}

Pin It on Pinterest

Share This