Prints the page title.

Description

The page title is determined automatically based on to the type of the page. For instance, the title of a product page is the name of the product it presents.

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:

You can define the content printed before or after the content printed by the tag by using the after and before attributes.

Allowed values:The HTML and Interface markup

E.g.

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

If the tag itself does not produce any content, the content of the after and before attributes won't be printed either.

escape:

Adds the escape character before quotation marks in the content to be printed.

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