Skip to content

MetaProperties

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

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

Properties

Attribute name Type Description
title string title of page.
keywords string meta keywords.
description string meta description.
links LinksList Reference to the LinksList object that represents links list of Link 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" />