function taxonomy_list_nodes_render in Taxonomy List 5
Same name and namespace in other branches
- 5.2 taxonomy_list.module \taxonomy_list_nodes_render()
- 6.2 taxonomy_list.module \taxonomy_list_nodes_render()
- 6 taxonomy_list.module \taxonomy_list_nodes_render()
- 7 taxonomy_list.module \taxonomy_list_nodes_render()
Select and render the nodes in the chosen vocabularies.
1 call to taxonomy_list_nodes_render()
- taxonomy_list_show in ./
taxonomy_list.module - Show the category list
File
- ./
taxonomy_list.module, line 348 - List the category specified in the URL
Code
function taxonomy_list_nodes_render($vids, $max_depth, $type = NULL) {
$output = '<div class="taxonomy-list">';
$terms = array();
// Get vocabulary names and list of tids.
foreach ($vids as $vid) {
$vocab = taxonomy_get_vocabulary($vid);
$vocab_titles[] = $vocab->name;
// Taxonomy_select_nodes will do the depth part for us, so we just get the top terms.
$terms = array_merge($terms, array_map('_taxonomy_get_tid_from_term', taxonomy_get_tree($vid, 0, -1, 1)));
}
drupal_set_title(implode(variable_get('taxonomy_list_title_separator', ' & '), $vocab_titles));
sort($terms);
// Render all nodes in a pager using taxonomy function.
$output .= taxonomy_render_nodes(taxonomy_list_select_nodes($terms, 'or', $max_depth, TRUE, $type));
$output .= '</div>';
// class="taxonomy-list"
return $output;
}