I have a view in D7 with a few exposed filters. This view generates a URL/page like this: example.com/node?location=XXX&check-in=XXX&check-out=XXX&lang=XXX.
I am looking to build a link passing in a couple of the current page's query parameters from above. I am using the
l() function and currently have the following:
print l("link_name","http://www.example.com/path", array('attributes'=>array('target'=>'blank'), 'query'=>array('lang'=>'en', 'currency'=>'USD', 'standardCheckin'=>$view->get_exposed_input(), 'standardCheckout'=>$view->get_exposed_input())));
I am looking to pass in the check-in and check-out parameter values from the views-generated page in to my link function's standardCheckin and standardCheckout keys. What I currently have obviously does not work. I'm using the
view::get_exposed_input function to pull in the values that are in the exposed filter, but it is pulling in ALL of the query parameters. This function does not seem to have any query parameters to limit the query. I also looked at using
drupal_get_query_parameters, but can not get those to work either (again, getting all parameters - can not limit to just the two I need).
I can pull the values from either the URL or from the exposed filter. My PHP is a bit limited, but what is the best function to use (and a nudge syntactically on how to limit the query would be appreciated)? Or is there a better Drupal method for achieving this?