You are here

function _sna_blocks_nodeterms in Simple Node Archive Blocks 6

Same name and namespace in other branches
  1. 7 sna_blocks.module \_sna_blocks_nodeterms()

Get the list terms that are tagged in a Node.

Parameters

int $nid: Node id.

Return value

array Array cotaining the list of terms.

1 call to _sna_blocks_nodeterms()
_sna_blocks_archivehtml in ./sna_blocks.module
Theme the result set to HTML.

File

./sna_blocks.module, line 467
Provide a simple node archive block

Code

function _sna_blocks_nodeterms($nid) {
  $node = node_load($nid);
  $results = taxonomy_node_get_terms($node);
  foreach ($results as $row) {
    $terms[$row->tid] = $row->name;
  }
  return $terms;
}