If you have many links pointing to the same URL, in printer-friendly page each link shows a different footnote number and the URL gets duplicated in the list at the bottom of the page.

Just modify the function print_friendly_urls to search for the URL before appending to the array:

function print_friendly_urls($url = 0) {
  static $urls = array();
  if ($url) {
    $url_idx = array_search($url, $urls);
    if ($url_idx) {
      return ($url_idx + 1);
    } else {
      $urls[] = $url;
      return count($urls);
    }
  }
  return $urls;
}

jpereza

Comments

jcnventura’s picture

Status: Active » Fixed

Hello,

Your suggestion works perfectly.

Thanks!

João

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.