By holbech on
Hi
Hope anyone can help me find the correct "hook" or solution
I've made a small "facetted sort" module that simple alters the url to filter by taxonomy terms, like
http://localhost/site/taxonomy/term/26,15 or http://localhost/site/taxonomy/term/26,15,1
The basic idea is that you click a term, it is added to the url and drupal takes care of the rest, thereby sorting by terms.
I would like to show the node count at the top of the page
Now, how the heck do I do that..
Regards, H
Comments
taxonomy_term_count_nodes($tid, $type = 0)
you may have to do a bit of adding for each termid, but taxonomy_term_count_nodes (http://api.drupal.org/api/function/taxonomy_term_count_nodes/5) should count the nodes. either place a call to the function in your theme's template.php or your custom module.
need more help? let me know and i am happy to walk you though how to accomplish this.
Mark Sanders
Q Collective
Mark Sanders
Q Collective
$tid as an array
Heya
Thx, almost perfect, still finding it hard to navigate the api...
I need to be able to supply an array for $tid, but now I've got something to build on, thx
- h
is it possible to count
is it possible to count nodes that are related to two terms at the same time..
I mean could I count nodes that have the terms 3 and 4 and neglegt ones that have the terms 3 and 5 ...I've been searching a lot for a solution , but I came up with nothing
the taxonomy_term_count_nodes is useless in my case ..