You are here

function theme_sna_blocks_node in Simple Node Archive Blocks 7

Same name and namespace in other branches
  1. 6 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_view in ./sna_blocks.module
Implements hook_block_view().

File

./sna_blocks.module, line 153
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;
}