drupal taxonomy term path to return alias

12,233

Solution 1

Use drupal_get_path_alias()

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

Solution 2

you may want to explore the url() function as well. I use it all of the time with node ids.

$node_href = url('node/'.$nid);

although you probably want something like:

$term_href = url('taxonomy/term/' . $tid);
Share:
12,233
Jourkey
Author by

Jourkey

Updated on June 26, 2022

Comments