You are here

function tft_og_block_view_alter in Taxonomy File Tree 7.2

Implements hook_block_view_alter().

Overwrite the TFT block to use the OG term (if in OG context).

File

modules/tft_og/tft_og.module, line 91
Hook implementations for TFT OG.

Code

function tft_og_block_view_alter(&$data, $block) {
  if ($block->module == 'tft') {
    if (arg(0) == 'node' && is_numeric(arg(1))) {
      $tid = tft_og_get_og_tid(arg(1));
      $data['content'] = theme('tft_folder_explorer', array(
        'folders' => tft_output_tree(tft_folder_tree($tid)),
        'vid' => variable_get('tft_vocabulary_vid', 0),
      ));
    }
  }
}