Prints the page title and, when necessary, the online store name.

Description

Page titles are determined automatically. For instance, the title of a product page is the name of the product it presents.

When necessary, the page title – {PageTitle} - can also be specified manually by using the Web Designer extension.

Syntax

{Title(
    shop_name: boolean
)}

Scope

Required scope: globaali

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

The format of the <title> element

...
<head>
    <title>{Title}</title>
    ...             

The example prints the page title and the online store name. The default value of the {Title} tag's shop_name attribute is true, so in this case there's no need to change anything.

...
<head>
    <title>Shipping conditions | MyCashflow Demo Store</title>
    ...            

Above you can see the tag's default output.

...
<head>
    <title>
        {Title(
            shop_name: false,
            after: ' | {%TitleSuffix}'
        )}
    </title>
    ...               

The above markup also retrieves the page title but without the online store name.

Instead, other contents can be added after the title by using the after attribute. The dictionary includes the 'TitleSuffix' code with contents that should be displayed in the title element on each page of the online store. To retrieve the contents, use the {Text} tag's short syntax.

Attribuutit

shop_name:

Defines whether the online store name should be printed in addition to the page title.

A vertical line is used as a separator between the page title and the store name.

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

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