Prints the list of the online store's versions that are available to the customer.

Kuvaus

The <ul> list to be printed does not include versions that are closed from visitors or are otherwise unavailable to the customer (versions that are restricted to certain customer groups).

Read more about store and language versions in our user guide.

Syntaksi

{LanguageNavigation(
    showcurrent: boolean,
    type: string
)}

Näkyvyys

Toimii näkyvyydessä: globaali

Tags with global scope can be used on any template and in any tag.

Creating the language navigation menu

{LanguageNavigation(
    before: '
        <ul class="NavigationList DropdownNavigation" id="LanguageNavigation">
            <li>
                <a>
                    <span class="Icon LanguageIcon"></span>{CurrentLanguage}
                </a>',
    after: '
            </li>
        </ul>'
)}

In the MyCashflow default theme, the language navigation menu is implemented by using two Interface tags: {LanguageNavigation} and {CurrentLanguage}.

The {LanguageNavigation} tag prints a list of all languages of the online store. Only the name is printed for each language, which is the default output of the {CurrentLanguage} tag. Before the list, a title is added to the menu as an li element by using the {CurrentLanguage} tag, which displays the current version's name. All other versions are printed inside the li element, so that the list can easily be used as a drop-down menu.

The image shows how the menu has been implemented in the MyCashflow default theme:

Attribuutit

showcurrent:

Specifies whether the selected version should be highlighted on the list.

Highlighting is done by adding the class name 'Current' to the list element of the selected version.

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

type:

Defines which one to print: version name or selected language.

Allowed values:

  • 'language': Prints the language of the version as a string.
  • 'name': Prints the name of the version (default value).
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.

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.

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.'