You are here

function theme_sna_blocks_node in Simple Node Archive Blocks 6

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

Returns a chronological archive block for node type.

1 theme call to theme_sna_blocks_node()
sna_blocks_block in ./sna_blocks.module
Implements of hook_block().

File

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

Code

function theme_sna_blocks_node($variables) {
  $node_type = $variables['value'];
  $archive_items = $variables['archive_items'];
  $display_year = $variables['year'];
  $display_month = $variables['month'];

  // Get an associate array contain the results.
  // Array([year (counter)] => Array([month(counter)] => Array([nid]=>title)))
  $results = _sna_blocks_resultset($node_type, 'node');
  $html = _sna_blocks_archivehtml($results, $archive_items, $display_year, $display_month, $node_type, 'node');
  return $html;
}