You are here

function views_page in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 views.module \views_page()
  2. 6.3 views.module \views_page()
  3. 7.3 views.module \views_page()

Page callback entry point; requires a view and a display id, then passes control to the display handler.

1 string reference to 'views_page'
views_plugin_display_page::execute_hook_menu in plugins/views_plugin_display_page.inc
Add this display's path information to Drupal's menu system.

File

./views.module, line 301
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_page() {
  $args = func_get_args();
  $name = array_shift($args);
  $display_id = array_shift($args);

  // Load the view
  if ($view = views_get_view($name)) {
    return $view
      ->execute_display($display_id, $args);
  }

  // Fallback; if we get here no view was found or handler was not valid.
  return drupal_not_found();
}