In Drupal 6, you can get the term object using the following function
taxonomy_get_term($tid);
Continue reading
In Drupal 6, you can get the term object using the following function
taxonomy_get_term($tid);
About 2 months ago i published a post on how to get the number of nodes of a specific taxonomy term by term ID.
Drupal – Get number of nodes of Taxonomy Term by Term ID
Unfortunately, the taxonomy_term_count_nodes() no longer works in Drupal 7 but you can get the count by Views in D7.
Continue reading
Previously, we talked about how to get the number of nodes of a specific term.
Drupal – Get Number of node of Taxonomy Term by Term ID
How about if i want to get the number of nodes under a specific parent term? Unfortunately, there is no such function. so i try to get that number by SQL. Here is the PHP code.
Continue reading
In Drupal, you can get the number of nodes of a specific term by
<?php print taxonomy_term_count_nodes($term_id); ?>
Done =)
Reference: StackOverflow – How do I create a node count for each each category term in Drupal?
I found a very good example on retrieving the Vocabulary object by name. Continue reading
Assume we have the following taxonomy hierarchy. Continue reading
The i18n module provides the Taxonomy Translation feature. After you have enabled it, edit the vocabulary which you want to localize and set the Multilingual options to Per language terms.
Continue reading
I want to create a taxonomy view which shows the term name and the term image. For those terms without term image, i want to filter out them. Unfortunately there is no term image filter in the view setting. One work around is overriding the view query by implementing the hook_views_pre_execute(&$view) in a custom module. Before you construct the new SQL, you should set all your desire settings in the view editing page first. Then you can create a new SQL base on that view query.
So in the custom module, add the following function. Continue reading
The Taxonomy Menu allows you listing all taxonomies in a menu. You can either link the taxonomy by term id or term name. I have Pathauto installed such that each term is linked to a URL alias.
Continue reading
Taxonomy Menu helps you create menus for Vocabulary. First, install the Taxonomy Menu.
Continue reading