You are here

function tft_opigno_breadcrumbs in Taxonomy File Tree 7

Implements hook_opigno_breadcrumbs().

File

./tft.module, line 277
Module hooks.

Code

function tft_opigno_breadcrumbs($gid) {
  $breadcrumbs = array();
  $node = menu_get_object();

  // Must we handle this page request for the breadcrumb ?
  if (isset($node->type) && $node->type == 'tft_file' || current_path() == 'node/add/tft-file' || preg_match('/^tft\\/(term\\/(add|edit|delete|archive)|terms\\/reorder)/', current_path())) {

    // Add the course files link.
    $breadcrumbs[] = l(t("Files"), "node/{$gid}/tft");
  }
  if (!empty($breadcrumbs)) {
    return $breadcrumbs;
  }
}