drupal taxonomy term path to return alias

Jourkey picture Jourkey · Jan 16, 2010 · Viewed 12.2k times · Source

Taxonomy term path:

http://api.drupal.org/api/function/taxonomy_term_path

Returns the unaliased path. I used pathauto to give the term alias, how can I return the aliased version?

Thanks.

Answer

Owen picture Owen · Jan 16, 2010

Use drupal_get_path_alias()

$path_alias = drupal_get_path_alias(taxonomy_term_path($term) );