Custom Search
When using the application template, you have the ability to use a custom search engine for your site.
Implementation
Customization of the search is done through the customSearch
parameter in the appTop
section of your page.
There are a few configuration options:
"action"
: the URL of the search you would like to point to"method"
: "get" or "post""placeholder"
: Optional - placeholder text that is displayed inside the search bar"id"
: Optional - you can provide an optional id for your search"name"
: Optional - you can customize the "name" attribute for your search"hiddenInput:
: Optional - you can provide data inputs through the "name" and "value" parameters
defTop.outerHTML = wet.builder.appTop({ ... "customSearch": [{ "action" : "https://www.canada.ca/en/sr/srb.html", "placeholder" : "Canada.ca", "id" : "wb-srch-q", "name" : "q", "method" : "get", "hiddenInput" : [{ "name" : "cdn", "value" : "canada" }] }] ... });