diff --git a/apachesolr_search.module b/apachesolr_search.module
index 1ca1d66..deb7ab5 100644
--- a/apachesolr_search.module
+++ b/apachesolr_search.module
@@ -1361,13 +1361,16 @@ function apachesolr_search_preprocess_search_result(&$variables) {
 function apachesolr_search_preprocess_search_results(&$variables) {
   // Initialize variables
   $env_id = NULL;
-
+  $page_id = NULL;
   // If this is a solr search, expose more data to themes to play with.
   if ($variables['module'] == 'apachesolr_search') {
     // Fetch our current query
     if (!empty($variables['search_page']->env_id)) {
       $env_id = $variables['search_page']->env_id;
     }
+    if (!empty($variables['search_page']->page_id)) {
+      $page_id = $variables['search_page']->page_id;
+    }
     $query = apachesolr_current_query($env_id);
 
     if ($query) {
@@ -1391,8 +1394,17 @@ function apachesolr_search_preprocess_search_results(&$variables) {
     $variables['pager'] = theme('pager', array('tags' => NULL));
 
     // Add template hints for search pages.
-    $page_id = $variables['search_page']->page_id;
-    $variables['theme_hook_suggestions'][] = 'search_results__' . $variables['module'] . '__' . $page_id;
+    if (!empty($page_id)) {
+      $variables['theme_hook_suggestions'][] = 'search_results__' . $variables['module'] . '__' . $page_id;
+    }
+    // Add template hints for environments.
+    if (!empty($env_id)) {
+      $variables['theme_hook_suggestions'][] = 'search_results__' . $variables['module'] . '__' . $env_id;
+    }
+    // Add template hints for both.
+    if (!empty($env_id) && !empty($page_id)) {
+      $variables['theme_hook_suggestions'][] = 'search_results__' . $variables['module'] . '__' . $env_id . '__' . $page_id;
+    }
   }
 }
 
