function views_preprocess_node

cis7 views.module views_preprocess_node(&$vars)
cle7 views.module views_preprocess_node(&$vars)
elmsmedia7 views.module views_preprocess_node(&$vars)
icor7 views.module views_preprocess_node(&$vars)
meedjum_blog7 views.module views_preprocess_node(&$vars)
mooc7 views.module views_preprocess_node(&$vars)

A theme preprocess function to automatically allow view-based node templates if called from a view.

The 'modules/' file is a better place for this, but we haven't got a chance to load that file before Drupal builds the node portion of the theme registry.


sites/all/modules/ulmus/views/views.module, line 299
Primarily Drupal hooks and global API functions to manipulate views.


function views_preprocess_node(&$vars) {
  // The 'view' attribute of the node is added in views_preprocess_node()
  if (!empty($vars['node']->view) && !empty($vars['node']->view->name)) {
    $vars['view'] = $vars['node']->view;
    $vars['theme_hook_suggestions'][] = 'node__view__' . $vars['node']->view->name;
    if (!empty($vars['node']->view->current_display)) {
      $vars['theme_hook_suggestions'][] = 'node__view__' . $vars['node']->view->name . '__' . $vars['node']->view->current_display;

      // If a node is being rendered in a view, and the view does not have a path,
      // prevent drupal from accidentally setting the $page variable:
      if ($vars['page'] && $vars['view_mode'] == 'full' && !$vars['view']->display_handler->has_path()) {
        $vars['page'] = FALSE;

  // Allow to alter comments and links based on the settings in the row plugin.
  if (!empty($vars['view']->style_plugin->row_plugin) && get_class($vars['view']->style_plugin->row_plugin) == 'views_plugin_row_node_view') {



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.