You are here

function views_url_node in Views (for Drupal 7) 5

Handle '$node' in a URL. Any valid node wil ldo.

1 string reference to 'views_url_node'
views_views_url_tokens in ./views.module
Default Views URL tokens

File

./views.module, line 1885

Code

function views_url_node($token, $argument, $arg) {
  if (!is_numeric($arg)) {
    return FALSE;
  }
  $node = node_load($arg);
  if (!$node) {
    return FALSE;
  }
  if ($argument && $node->type != $argument) {
    return FALSE;
  }

  // if a node loads, return true.
  return TRUE;
}