I trying to change term's path using below module:

function taxonomy_views_entity_info_alter(&$entity_info) {
  $entity_info['taxonomy_term']['uri callback'] = 'taxonomy_views_term_uri';
}

function taxonomy_views_term_uri($term) {
  if ($term->vocabulary_machine_name == 'category') {
    return array(
        'path' => 'artworks/' . $term->tid,
    );
  } else {
    return taxonomy_term_uri($term);
  }
}

It works when I'm rendering a term reference field, but Taxonomy menu still building menu in old style: taxonomy/term/$tid

Comments

hles’s picture

Version: 7.x-1.4 » 7.x-2.x-dev
Priority: Critical » Normal
hles’s picture

Status: Active » Postponed

Any chance you would work on this @mohamadaliakbari ? That would be great !

In the meantime, I have to postpone this because there are still missing features in 7.x branch compared to 6.x branch and handling entities is not a priority right now... Do change the status back if you can provide work on this feature.

hles’s picture