Implements hook_page_alter().
function views_page_alter(&$page) {
// If the main content of this page contains a view, attach its contextual
// links to the overall page array. This allows them to be rendered directly
// next to the page title.
if ($view = views_get_page_view()) {
views_add_contextual_links($page, 'page', $view, $view->current_display);
}
}