is a simple question, I whant get the term ID (tid) from standard drupal taxonomy url taxonomy/term/167 ou 167 is my tid and use as argument on views.
I found this code to get the tid:
$term_path=drupal_get_normal_path('position/'.arg(1));
$tid = basename($term_url);
$$here_is_my_tid = taxonomy_term_load($tid);
How to get taxonomy by URL alias?
I try also :
$here_is_my_tid = drupal_lookup_path('source', 'taxonomy/term/'.$tid);
$here_is_my_tid = drupal_get_path_alias('taxonomy/term/' . $tid);
But I try many combination without success.
Here is my views with the tid from url I try to pass "$here_is_my_tid"
$view1 = views_embed_view('mavue','page',$here_is_my_tid);
if(arg(0) == 'taxonomy' && arg(1) == 'term') {
$tid = (int)arg(2);
$term = taxonomy_term_load($tid);
}
$view1 = views_embed_view('mavue','page',$term);
By advance thanks