Drupal's category (taxonomy) name of article (node)? -
developing custom drupal's theme. contain custom node.tpl.php file.
how can , print related taxonomy names of selected node?
tnx in adv!
edit: doh, apologies, i'm seeing drupal 7 tag, specifically. appears thread has possible solutions: http://drupal.org/node/909968
with d6 (not 100% d7) in node's template .php files (and similarly, in view or anywhere have access node's properties custom php, view or block), can use following:
// returns array of taxonomy objects given node $tax_terms = taxonomy_node_get_terms($node); // prints each term name foreach ($tax_terms $tax) { print $tax->name; }
also, there's few useful drupal functions cases this:
// print_r's properties of given node, similar devel dpr($node); // using in above 'for' give properties of each taxonomy object dpr($tax);
here's website lists few more of these functions.
Comments
Post a Comment