Skip to content

MetaProperties

The MetaProperties object represents SEO meta properties for current page in the storefront.

classDiagram
  direction LR
  MetaProperties --> LinksListWithAttributes
  MetaProperties --> PropertiesList
  LinksListWithAttributes "1" --o "*" LinkWithAttributes
  PropertiesList "1" --o "*" Property
  class MetaProperties{
    string title
    string keywords
    string description
    LinksListWithAttributes links
    PropertiesList properties
  }
  class LinkWithAttributes{
  }
  class Property{
  }
  class LinksListWithAttributes{
  }
  class PropertiesList{
  }

Properties

Attribute name Type Description
title string title of page.
keywords string meta keywords.
description string meta description.
links LinksListWithAttributes Reference to the LinksListWithAttributes object that represents links list of LinkWithAttributes object associated with current page.
properties PropertiesList Reference to the PropertiesList object that represents list of Property object associated with current page.

Examples

title property

<title>{{ metaProperties.title }}</title>
<title>Product SEO Title</title>

keywords property

<meta name="keywords" content="{{ metaProperties.keywords }}">
<meta name="keywords" content="Keyword 1, Keyword 2">

description property

<meta name="description" content="{{ metaProperties.description }}">
<meta name="description" content="Product SEO Description">
{% for link in metaProperties.links %}
    <link rel="{{ link.title }}" href="{{ link.url.absolute }}" />
{% endfor %}
<link rel="prev" href="https://example.com/pl/c/category-name/9" />
<link rel="canonical" href="https://example.com/pl/c/category-name/9/2" />
<link rel="next" href="https://example.com/pl/c/category-name/9/3" />

properties property

{% for property in metaProperties.properties %}
    <meta property="{{ property.name }}" content="{{ property.value }}" />
{% endfor %}
<meta property="og:type" content="product" />
<meta property="og:title" content="Product name" />
<meta property="og:url" content="https://example.com/en/p/product-name/98" />
<meta property="og:description" content="Product description" />
<meta property="og:image" content="https://example.com/environment/cache/images/image.jpg" />
<meta property="og:site_name" content="Site name" />