Robin van Emden's blog on things Drupal
Robin van Emden's blog on things Drupal
In Drupal 6 as you could go into the taxonomy section of the admin area and look at the vocabulary edit URL to find the numerical vocabulary id. In Drupal 7 the URL is no longer as verbose as it now shows the machine name of the vocabulary, for example admin/structure/taxonomy/my_vocabulary/edit.
If you have access to Drush, there is another way to quickly find the VID though:
drush php-eval '$tax=taxonomy_vocabulary_machine_name_load("main_site_structure"); echo $tax->vid;'
Comments
Can't get this to work, damn
By Jnsl (not verified) on 07 Jul 2011 at about 12:53.Can't get this to work, damn seems very handy though
Hi Jnsl, Just tested this on
By admin on 07 Jul 2011 at about 13:03.Hi Jnsl,
Just tested this on another server / another D7 install (Drush version 4.4), works like a charm:
drush php-eval '$tax=taxonomy_vocabulary_machine_name_load("tags"); echo$tax->vid;'
where "tags" is the machine name.
Ah ofc. I'm sleeping, missed
By Jnsl (not verified) on 07 Jul 2011 at about 13:16.Ah ofc. I'm sleeping, missed the machine name hehe. Thanks for quick reply