By venkat-rk on
This phpsnippet (http://drupal.org/node/23415#comment-60089) shows a nice way to display the terms of a particular vocabulary.
Could someone please help with code for the following?
1.) How can I show *just* a list of the vocabulary's terms- that is, without the count, last updated and the 'no content' info
2.) Similarly show *just* the sub-terms of a term?
Thanks in advance
Comments
Just list voculary terms
This snippet will just show the term names (linked to page list content with term) for a vocabulary
add (# of nodes)?
Greetings,
I'm trying to setup a list of sub-terms within a parent term and show the number# of nodes contained within (parentheses). For example, say my vocabulary is 'Food' and I have a term of 'Fruit', which has sub-terms called 'apples', 'oranges', and 'bananas'.
I want my list to appear like this if 'apples' had 3 nodes, ...etc:
All Fruit
The snippet above is great, I just need to add the (#) feature to the first snippet. Has anyone done this or can help?
List just the sub terms of a taxonomy term
This script will just show the sub-terms of a term (specified by setting $tid).
Thanks, nevets. As always,
Thanks, nevets. As always, you are kind to share these code snippets on the forums. They work great. I will find some time to add these to the handbook.
By the way, I had to add <?php> and ?> at the beginning and end of the above code to make it work.
Hi there... where i should
Hi there...
where i should paste that code in .. ?
i'm using drupal 5.3
help please..
Either a custom block or node
You can either place the code in a custom block or in a node, in either case you will need the
<?phpand?>tags around the code as mentioned above.Hi, How can you show the
Hi,
How can you show the nodes in the list (title-body) instead of count of nodes?
Please assist,
thanks in advance,
greetings, Martijn
Something like the following
Something like the following should work:
If using CCK... Where $options is an array of content types as defined in the cck table (i.e. for content type 'notice' this would be 'content_type_notice'):
Mind you, you're probably better off using the views module for this. Create a view there and call it manually as described in http://drupal.org/node/48816.