is there a way to use preprocess_page only for certain page templates?
I made a test using the following code, in my test site.

function code_testing_preprocess_page(&amp;$variables) {
  if (isset($variables['node'])) {
    watchdog('code_testing', var_export($variables['node'], TRUE), array(), WATCHDOG_DEBUG);
  }
}


I then created a view showing the nodes of a specific content type (in my case, it was snippet). When I visited the view page, and checked the output from watchdog(), I have not found any information about $variables['node'].
Effectively, that is what I would expect, as $variables['node'] is set in template_preprocess_page() using the following code.

  if ($node = menu_get_object()) {
    $variables['node'] = $node;
  }


Probably, if the view uses a URL like http://example.com/node/1, and there is a node with that node ID, $variables['node'] could be initialized. Differently, if the view is using a different URL, I would not expect $variables['node'] to be set.

To notice that views_preprocess_node() uses the following code.

  if (!empty($vars['node']-&gt;view) &amp;&amp; !empty($vars['node']-&gt;view-&gt;name)) {
    $vars['view'] = $vars['node']-&gt;view;
    $vars['theme_hook_suggestions'][] = 'node__view__' . $vars['node']-&gt;view-&gt;name;
    if (!empty($vars['node']-&gt;view-&gt;current_display)) {
      $vars['theme_hook_suggestions'][] = 'node__view__' . $vars['node']-&gt;view-&gt;name . '__' . $vars['node']-&gt;view-&gt;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'] &amp;&amp; $vars['view_mode'] == 'full' &amp;&amp; !$vars['view']-&gt;display_handler-&gt;has_path()) {
        $vars['page'] = FALSE;
      }
    }
  }


Probably the first control statement can be used in hook_preprocess_node() to check if a view is being served.