views:

39

answers:

1

i have follow taxomony has been set up:

accommodation
-backpacker
-guest
-holiday

and i have a content type called listing which is connected with accommodation taxomony, whenever i add a listing, this listing is associated with a type of accommodation.

now i need to find out how many listings under each taxomony.

for example: if i have set up 3 backpackers, 2 guests, 1 holiday, for accommodation i need a answer 6, for backpacker 3 etc.

is there a drupal funciton for this kind of calculation?

i am use drupal 6.

+2  A: 

Take a look at taxonomy_term_count_nodes() for the basic version (counts only published nodes for exactly one term), and at taxonomy_select_nodes() if you need more flexibility in your counting (e.g. include depth, combine several terms, etc.).

Henrik Opel

related questions