I am seeking assistance on creating a list of taxonomy terms based on a organic group ID and content type. This list will be the taxonomy terms as links to all of that content type in that group with that tag applied. See below
--
I have a taxonomy vocabulary Keywords.
I have a group called Storylines.
Storylines contains books and their childpages. I use the Keywords taxonomy vocabulary to tag these books and pages.
I'd like to display a list of taxonomy terms from the books in that group as links to a list of content based on those criteria.
So if I have 3 books each tagged "special." When I click the "special" link from my view of taxonomy terms (based on this group ID & content type) I see a listing of those 3 books.
Please tell me this is possible!!
I have a fairly good start with the following code to list all terms from this vocabulary, but I'm not sure how to apply the other limiting criteria. Any help is greatly appreciated.
[code]
$vocabulary_id = 18;
$result = db_query("SELECT d.tid, d.name, MAX(n.created) AS updated, COUNT(*) AS count FROM {term_data} d INNER JOIN {term_node} USING (tid) INNER JOIN {node} n USING (nid) WHERE d.vid = $vocabulary_id AND n.status = 1 GROUP BY d.tid, d.name ORDER BY updated DESC, d.name");
$items = array();
while ($category = db_fetch_object($result)) {
$items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid);
}
return theme('item_list', $items);
[/code]
Comments
I still have not figured this
I still have not figured this out. Any assistance is appreciated.
I am also interested..
have you found how to do it?