Skip to content

Instantly share code, notes, and snippets.

@dbazuin
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbazuin/2ee3b337d17eec952d0f to your computer and use it in GitHub Desktop.
Save dbazuin/2ee3b337d17eec952d0f to your computer and use it in GitHub Desktop.
Displays the active views on the current page
/**
* Implements hook_views_pre_view().
*/
function [module name]_views_pre_view($view) {
if (user_access('administrator')) {
$name = $view->name;
$display = $view->current_display;
$path = 'admin/structure/views/view/' . $name . '/edit/' . $display;
drupal_set_message(l($name, $path));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment