function taxonomy_list_nodes_render in Taxonomy List 7
Same name and namespace in other branches
- 5.2 taxonomy_list.module \taxonomy_list_nodes_render()
- 5 taxonomy_list.module \taxonomy_list_nodes_render()
- 6.2 taxonomy_list.module \taxonomy_list_nodes_render()
- 6 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 788 - List all terms in a vocabulary.
Code
function taxonomy_list_nodes_render($vids, $max_depth) {
$output = '<div id="taxonomy-list">';
$terms = array();
// Get vocabulary names and list of tids.
foreach ($vids as $vid) {
$vocab = taxonomy_vocabulary_load($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.
$selected_nodes = taxonomy_list_select_nodes($terms, 'or', $max_depth);
$output .= '</div>';
// id="taxonomy-list"
return $output;
}