Thanks to visit codestin.com
Credit goes to storefront.developers.shoper.pl

Skip to content

Search

Availability: All contexts


The search module is used to render a search bar on a page.

Configuration parameters

none

Module source code

{% from "@macros/search.twig" import search %}

{{ search({
    instanceId: moduleInstance,
    displayMode: moduleConfig.displayMode
}) }}

Macros reference

Webcomponents reference

Used styles

Module configuration schema

[
    {
        "state": "unfolded",
        "label": "General settings",
        "elements": [
            {
                "type": "infobox",
                "name": "infobox",
                "options": {
                    "type": "blank",
                    "message": "#### Related settings in the admin panel%s- changing phrases in [translations](%s)%s- the searching method and suggester view in [the search engine settings](%s)",
                    "placeholderValues": [
                        "\n",
                        "\/admin\/configLanguages\/list",
                        "\n",
                        "\/admin\/configSearch"
                    ]
                }
            },
            {
                "type": "radio",
                "name": "displayMode",
                "label": "Search display mode",
                "defaultValue": "dropdown",
                "hint": "The display mode on the mobile view does not change regardless of the selected options.",
                "options": {
                    "radioOptions": [
                        {
                            "key": "dropdown",
                            "label": "dropdown search results"
                        },
                        {
                            "key": "popup",
                            "label": "pop-up window"
                        }
                    ]
                }
            }
        ]
    }
]