Browse Source

Take page query parameters into account

gdroc 5 years ago
parent
commit
0f55be3657
1 changed files with 7 additions and 1 deletions
  1. 7 1
      tripal_jbrowse_page/includes/tripal_jbrowse_page.page.inc

+ 7 - 1
tripal_jbrowse_page/includes/tripal_jbrowse_page.page.inc

@@ -15,9 +15,15 @@ function tripal_jbrowse_page_page($genus, $species) {
   ],
   ],
   ['load_instance' => TRUE]);
   ['load_instance' => TRUE]);
 
 
+  // Determine Query paramters.
   $query_params = tripal_jbrowse_mgmt_build_http_query($instance);
   $query_params = tripal_jbrowse_mgmt_build_http_query($instance);
-  $settings = tripal_jbrowse_mgmt_get_settings();
+  $page_q = drupal_get_query_parameters();
+  foreach ($page_q as $qkey => $qvalue) {
+    $query_params[$qkey] = $qvalue;
+  }
 
 
+  // Build the URL.
+  $settings = tripal_jbrowse_mgmt_get_settings();
   $url = url($settings['link'],['query' => $query_params]);
   $url = url($settings['link'],['query' => $query_params]);
 
 
   if (variable_get('trpjbrowse_page_embed', 1)) {
   if (variable_get('trpjbrowse_page_embed', 1)) {