New feature: Configureable URL-parameters

,

Introducing fully configureable URL-parameters in true white label spirit!

Findkit UI saves the search state into the URL. Meaning the search view is linkable and it can be returned to with browser back. So far the URL-parameters have been partly configureable with instanceId and separator, but starting from UI v1.5.0 you will be able to fully overwrite the packages URL-parameter keys using the new option searchKey.

Group identifying URL-parameter can also now be overwritten with groupKey. If you have already dived into Custom Router Data the custom router data prefix is also configureable with customRouterDataPrefix.

Why the long URL-parameters to begin with?

Simply put; we want the Findkit UI library to just work when installed on a website.

Most of our clients use WordPress. WordPress’s default search captures “s” query parameter by default if it’s not disabled in code. So the default of ?s=query is out of the question. The list of reserved terms on WordPress alone is a long one. Other systems and packages use other generic URL-parameters, if we want the UI to “just work”, we need to use URL-parameters that are not used by others.

Sometimes a webpage can have multiple Findkit searches, and the UI library needs to know what parameters belong to which Findkit instance. Most commonly this happens on archive pages, where the archive search is build with Findkit, but the page also has the normal site search in header. Our solution for keeping the URL-parameters unambiguous was to introduce instanceId, an id that would separate Findkit from other Findkits. The instanceId (defaults to "fdk") is used in forming the default search key ?fdk_q=query.

Considerations

To keep things unambiguous within Findkit instance(s), Findkit now keeps track of Findkit’s reserved URL-parameters and tries to throw early in a case of a collision.

We trust that you know your system better than we do, and know what URL-parameter keys you can and can’t use.

This feature request came from our excellent partner Dude!
We are always open to receiving feedback from our users and happy to try to accommodate their requests.