summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-08-08 20:55:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-08-08 20:55:15 -0300
commit1a43207e231856ff0d3ceabad8783e73e43053b7 (patch)
tree2d2f8c74c8479819e7d7016cb71215b55099a890
parente94703290528d891ceb1a912e4c18d1538d50be5 (diff)
downloadcalendario-1a43207e231856ff0d3ceabad8783e73e43053b7.tar.gz
calendario-1a43207e231856ff0d3ceabad8783e73e43053b7.tar.bz2
Singularizing tag url
-rw-r--r--calendario.module4
1 files changed, 3 insertions, 1 deletions
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',
);
}