Add breadcrumb for returning to search results
authorColeman Watts <coleman@civicrm.org>
Thu, 7 Jan 2016 17:38:34 +0000 (12:38 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 7 Jan 2016 17:43:09 +0000 (12:43 -0500)
CRM/Contact/Page/View.php

index 499ddbcf179d4224bc516c248fe80812593089f3..44d7a0a2a6061acd84e3d9b02ec43095bf88d793 100644 (file)
@@ -135,6 +135,7 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
         $found = TRUE;
       }
 
+      $context = CRM_Utils_Array::value('context', $_GET);
       if (!$found) {
         // seems like we did not find any contacts
         // maybe due to bug CRM-9096
@@ -143,6 +144,15 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
           $navContacts['nextPrevError'] = 1;
         }
       }
+      elseif ($context) {
+        $this->assign('context', $context);
+        CRM_Utils_System::appendBreadCrumb(array(
+          array(
+            'title' => ts('Search Results'),
+            'url' => CRM_Utils_System::url("civicrm/contact/search/$context", array('qfKey' => $qfKey)),
+          ),
+        ));
+      }
     }
     $this->assign($navContacts);