logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: getting terms by taxonomy in theme: msg#00063

Subject: Re: getting terms by taxonomy in theme
Someone once gave me code to do this in version 3. Here's how it
would work. If I have two taxonomies, e.g. 1) Subject 2) Format I

Two vocabularies?

Yes, two. Actually on some sites like iaslash, I use 4 (subject, people, format, importance), on urlgreyhot.com I use 3 (subject, people, emotion). The one I'm working with now will use more than 4 probably. One of the reasons I specified moving to a system of controlled vocabularies in version 3 was so that we could use multiple taxonomies to describe content. I do this everywhere, being an information geek.

want to be able to show the under each node, separating by taxonomy.
For instance:

 Subject: WiFi, Handheld devices
 Format: Applications

function taxonomy_node_get_terms_by_vocabulary($nid, $vid, $key =
"tid") {
is probably helpfull.
First call taxonomy_get_vocabularies() and then iterate over the
vocabularies calling taxonomy_node_get_terms_by_vocabulary for each.

Yikes. I was afraid of getting a response like that. I'm not very good at PHP. Someone once showed me how to do this in version 3, having done it themselves, which is why I posted the question here. I will see what I can understand and try to hack the above and report back to the list if I'm successful.

Thanks,
Michael
--
[ Drupal support list | http://list.drupal.org/ ]




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>