views_view_page

Versions
5
views_view_page()

This views a view by page, and should only be used as a callback.

Parameters

$view_name The name or id of the view to load

$args The arguments from the end of the url. Usually passed from the menu system.

Return value

The view page.

Code

contributions/views/views.module, line 401

<?php
function views_view_page() {
  $args = func_get_args();
  $view_name = array_shift($args);
  $view = views_get_view($view_name);

  if (!$view) {
    drupal_not_found();
    exit;
  }

  $output = views_build_view('page', $view, $args, $view->use_pager, $view->nodes_per_page);
  if ($output === FALSE) {
    drupal_not_found();
    exit;
  }

  return $output;
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.