Hi all,
I've been stucked with this for two weeks now.
This block of code does exactly what I want
<?php
$random_nid = 42;
$tids = array_keys(taxonomy_node_get_terms($random_nid));
$result = taxonomy_select_nodes($tids);
$output .= '<p>';
$output .= taxonomy_render_nodes($result);
$output .= '</p>';
return $output;
?>
but when I use it in my module below, the taxonomy_render_nodes function fails with "memory exausted".
I've tried to increase the memory, but it didn't help.
Any Ideas ?
function committee_view(&$node, $teaser = FALSE, $page = FALSE) {
$content = theme('committee',$node);
$node->body = $content;
return $node;
}
function theme_committee($node) {
$output ='';
$header = array(t("Chair"),t("Secretary"),t('Frequency'),t('Rep/Delegate'));
$rep = '';
$rows[0] = array($node->chair,$node->secretary,$node->frequency,$rep);
$output .= theme('table', $header, $rows);
$output .= '<div class="content">';
$output .= l(t("Go to the Committee Homepage for more Information"), "$node->homepage");
$output .= "<br/><br/>";
$output .= t("$node->body\n");
$output .= '</div>';
$tids = array_keys(taxonomy_node_get_terms($node->nid));
$result = taxonomy_select_nodes($tids);
$output .= '<p>';
$output .= taxonomy_render_nodes($result);
$output .= '</p>';
return $output;
}