By chinafka on
I'm not sure what module or if I can do this with a module for 6.x that will display in a block a list of the terms in a vocabulary and the number of terms displayed next to the term. So...
Dogs (9)
Cats (3)
Birds (14)
etc..
Comments
http://drupal.org/project/vie
http://drupal.org/project/views
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
have a look at this link
http://drupal.org/node/195034
with views it's not possible to show node count
make it simple will make your life easy........
Ram
with views it's not
um... it most certainly is, they are called "summary" views. you really should know what you're talking about before stating something as a "fact".
For an example see: http://www.elderweb.com/home/sitemap/A
For 2 writeups see:
For d5 this is easily done with views + views_bonus (which includes the abc style view ready to enable).
In d6 core views2 includes a "glossary" style view that just needs to be enabled.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Try something like this
Best to throw it in a module using hook_block, http://api.drupal.org/api/function/hook_block, but php code in a block would do:
This produces something like:
Sports
Total 10 terms:
PS: Not fully sure what you mean by number of terms displayed next to the term
Alan Davison
www.caignwebs.com.au
Alan Davison
And the total term child count
This is a much more expensive DB operation, rechecks each level for children and recursively does the same for their children:
<?php print taxonomy_get_tree($vocab->vid, $r->tid); ?>Alan Davison
www.caignwebs.com.au
Alan Davison
The glossary is not what I need
At least at that level and just linking me to the views module isn't really going to help me out.
Look at this site http://www.collegevolleyballcoach.com/
The way the terms on the right also have the term count next to them, that's all that I need.
...and just linking me to
wow, maybe it's just been a really bad week in the forums for these kinds of posts, but holy smokes that just strikes me so very wrong. In your original post you asked for a module recommendation (nothing more), and that's precisely what i gave you. It's also exactly doable with views. If you don't want to spend the time or effort necessary to learn views then you can use the code provided in another reply above.
If you expected or wanted a tutorial then you should have asked for one, you asked only for a module recommendation. We're a little light on ESP here-- it's very difficult provide answers to requests that have never been verbalized.
If you expect people in the forums to do what you want for you without having to do any homework then you're using the wrong cms.
and btw, had you simply typed "term count block" into the d.o. searchbox (or searched d.o. with google), you would have been greeted with a solution to your request in the very first page of results.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Thanks
Thank you so much! That was what I was looking for. I modified it a bit though to match my requirements.
I needed a way to show the number of categories/terms in a specific vocabulary (vid=1) so I modified the code to this:
Hope it helps people who want to do something similar.