Drupal 7 Hook Views Pre Render

[Solved] Drupal 7 Hook Views Pre Render | Php Frameworks Drupal - Code Explorer | yomemimo.com
Question : drupal 7 hook_views_pre_view

Answered by : tame-teira-9zp9fvlaxt3i

function hook_views_pre_view(&$view, &$display_id, &$args) { // Change the display if the acting user has 'administer site configuration' // permission, to display something radically different. // (Note that this is not necessarily the best way to solve that task. Feel // free to contribute another example!) if ($view->name == 'my_special_view' && user_access('administer site configuration') && $display_id == 'public_display') { $view ->set_display('private_display'); }
}

Source : https://api.drupal.org/api/views/views.api.php/function/hook_views_pre_view/7.x-3.x | Last Update : Thu, 01 Apr 21

Answers related to drupal 7 hook views pre render

Code Explorer Popular Question For Php Frameworks Drupal