Could tagadelic be made working with pathauto?
So that we could avoid this kind of links: /tagadelic/chunk/15 and instead be able to customize this easiely

Comments

metawake’s picture

Assigned: Unassigned » metawake
Status: Active » Needs review

Here is how I've made tagadelic work with Pathauto. I've modified theme_tagadelic_weighted().

It now pulls aliases from url_alias table and displays them in links, so that
we see not plain 'term/5' links, but more meaningful aliased links. The code also checks if both pathauto and related alias exist.
At last, I can see transliterated tag names on my site in tagadelic links!

Would like to know other developer's opinion as to whether approve this patch or not.

function theme_tagadelic_weighted($terms) {
  $output = '';

  foreach ($terms as $term) {
    
  $link = taxonomy_term_path($term);

  if (module_exists('pathauto')) {
      $alias_data =   _pathauto_existing_alias_data($link);
      $new_link = $alias_data['old_alias'];	
      if ($new_link) $link = $new_link;

    }
    $output .= l($term->name, $link, array('attributes' => array('class' => "tagadelic level$term->weight", 'rel' => 'tag'))) ." \n";
  }
  return $output;
}
Bèr Kessels’s picture

Status: Needs review » Closed (works as designed)

Tagadelic uses the taxonomy link feature. Please read back in the numerous issues alike this one that I already closed.