From: Silvio Rhatto Date: Wed, 8 Aug 2012 23:55:15 +0000 (-0300) Subject: Singularizing tag url X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1a43207e231856ff0d3ceabad8783e73e43053b7;p=drupal%2Fcalendario.git Singularizing tag url --- diff --git a/calendario.module b/calendario.module index bfa61e7..c8e5665 100644 --- a/calendario.module +++ b/calendario.module @@ -73,7 +73,9 @@ function calendario_views_post_render(&$view, &$output, &$cache) { * Entity uri callback. */ function calendario_taxonomy_term_uri($term) { + $type = ($term->vocabulary_machine_name == 'tags') ? 'tag' : $term->vocabulary_machine_name; + return array( - 'path' => 'calendario/'. $term->vocabulary_machine_name .'/'. $term->name .'/mes', + 'path' => 'calendario/'. $type .'/'. $term->name .'/mes', ); }