Prints the search term entered in the search field.

Syntax

{SearchKeyword}

Scope

Required scope: searchterm

The tag is used only on the search page and in helper attributes of the following tags:

Printing recommended search terms in a theme

You can print recommended search terms for a search term on a page by using the {SearchSuggestions} and {SearchUrl} tags. The recommendations are determined automatically based on previous searches performed in the online store.

{SearchSuggestions(
    before: '<p class="SearchSuggestions"><strong>Suositeltuja hakutermejä: </strong>',
    after: '</p>',
    helper: '{{ <a href="{SearchUrl}">{SearchKeyword}</a>&#8194; }}'
)}

The example shows how to print a list of recommended search terms on the search engine result page. A link to the search page is printed for each recommendation by using the {SearchUrl} tag. The search term itself is printed by using the {SearchKeyword} tag.

Attribuutit

after/before:

By using the after and before attributes you can define content that is output either after or before the tag's output.

Allowed values:The HTML and Interface markup

E.g.

  • before: '<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'
  • after: '<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'

If the tag does not produce any content, neither the content of the after and before attributes will be output.

or:

Defines alternative content that is displayed if the tag itself does not produce any content.

Allowed values:The HTML and Interface markup

E.g. or:'Sisältöä ei löytynyt.'

escape:

Adds an escape character before quotation marks in the output.

The attribute makes it easier to process the tag-produced content when using JavaScript.

Allowed values:true/false. The default value is false.