I'm trying to add the searched text value to the query string in the url (
In the search display templates, I see ctx and Srch objects exist that have a lot of properties about the current item and general search properties. However, I'm having an issue trying to get the actual searched value (in pairs or all in one string). I can extract it from the url hash since it's not in the querystring anymore, but I was wondering if there was a more standardized way to do this.
edit: for now, I have two methods to extract a querystring value and a hash value, and setting searchText (which is conditionally appended to the url) in the following way:
var searchText = "&searchText=" + GetHashVal("k") || GetQueryVal("k");