Taxonomy terms on a page
Last modified: April 8, 2006 - 00:27
I have a page with a table where each cell should list nodes that are at the intersection of two keywords. In order to accomplish this I have modified Moshe's code slightly. Here it is:
$content = "Some text";
$content .= getnodes (1,2);
$content .= "Some text";
$content .= getnodes (3,4);
print $content;
function getnodes($id1, $id2) {
$tax = array ("str_tids" => "$id1, $id2", "tids" => array ($id1, $id2), "operator" => "and");
$result = taxonomy_select_nodes(array2object($tax), 0);
while ($node = db_fetch_object($result)) {
$output[] = l($node->title, "node/". $node->nid);
}
return (theme_item_list($output));
}