You are here

function view_alias_taxonomy in View Alias 5

Same name and namespace in other branches
  1. 6.2 view_alias.module \view_alias_taxonomy()
  2. 6 view_alias.module \view_alias_taxonomy()

Implementation of hook_taxonomy recur_views is keyed with the vocabulary id of the terms to alias with, the value is the view infomation.

File

./view_alias.module, line 310
view_alias.module

Code

function view_alias_taxonomy($op, $type, $array = NULL) {
  $recur_views = variable_get("view_alias_recurring_views", array());
  if (empty($recur_views)) {
    return;
  }
  if ($type == "term" && ($op == 'insert' || $op == 'update')) {
    if (in_array($array['vid'], array_keys($recur_views))) {
      $view = $recur_views[$array['vid']];
      path_set_alias($view->url . "/" . $array['tid'], $view->url . "/" . $array['name']);
    }
  }
}