Prints the page title.

Description

The page title is determined automatically based on the type of the page. On a product page, for example, the product name functions as the page title by default (though on the product form, you can also define the page title expressly for search engine optimization).

You may want to use this tag especially on the general content page, which is used for displaying pages thathave their own template in the theme.

The page title can be specified manually if the Web Designer extension has been enabled in the store.

Syntax

{PageTitle}

Scope

Required scope: globaali

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

Specifying the page title by using the {PageTitle} tag

...
<body>
    ...
    <h1>
        {PageTitle}
    </h1>               

The {PageTitle} tag is usually added without any modifications to the page title element. In this way, the element can be reused, when necessary, on all pages of the online store.

...
<body>
    ...
    <h1>
        {PageTitle}
        {ProductBrand(
            before: ' | '
        )}
    </h1>               

Depending on the page, the title can include other contents apart from the {PageTitle} tag. For example, you can add the brand name to the title of a product page by using the {ProductBrand} tag. By using the before attribute, you can add a separator character before the brand name that won't be displayed if {ProductBrand} doesn't produce any contents (the brand hasn't been specified).

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.

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