The Searchbar
component in SDK 1.7.0 has a new redirectUrlTarget
attribute. This controls the target for the redirectUrl
. It expects a valid target: “_blank”, “_self”, “_parent”, “_top” or the name of a frame.
If you’d like the search bar to open the experience on a new page, or if it’s included within a modal, you can take advantage of this config option when adding the search bar to a site.
Note that the redirectUrlTarget
defaults to “_self” if not specified (which is the browser default and used for all search bars today).
In the Theme
"SearchBar": {
"redirectUrlTarget": "_blank"
},
SDK Directly (in the onReady
):
this.addComponent('SearchBar', {
container: '.search-bar-container',
redirectUrl: 'https://myanswersexperience.com',
redirectUrlTarget: "_blank"
},