Due to caching, this should be faster then the current way. Also rename "page_arguments" to "page_type" so views that take arguments can be recreated with minimal effort.
/**
* Page callback entry point; requires a view and a display id, then
* passes control to the display handler.
*/
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();
}
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | boost-598942.2.patch | 24.27 KB | mikeytown2 |
| #2 | boost-598942.1.patch | 23.91 KB | mikeytown2 |
| #1 | boost-598942.patch | 23.88 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 commentedComment #2
mikeytown2 commentedComment #3
mikeytown2 commentedComment #4
mikeytown2 commentedcommitted