function views_page

Same name in other branches
  1. 7.x-3.x 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 437

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();
}