Skip to content

Page

The Page object represents a single information page in the storefront.

classDiagram
  direction LR
  Page --> PageUrl
  class PageUrl{
  }
  class Page{
    int id
    string name
    PageUrl url
    string content
    Metafieldst metafields
  }

Properties

Attribute name Type Description
id int The unique identifier of the page.
name string The name of the page.
url PageUrl The PageUrl object that represents the url to the page.
content string The content of the page.
metafields Metafields Reference to the Metafields object that provides access to the namespaced containers for key - value pairs of data.

Examples

id property

{{ page.id }}
1

name property

{{ page.name }}
Page name

url property

{% set page_id = 1 %}
{% set page = ObjectApi.getPage(page_id) %}
<a href="{{ page.url }}" title="{{ page.name }}">
    {{ page.name }}
</a>
<a href="/pl/i/some-page/11" title="Page name">
    Page name 
</a>

content property

{{ page.content }}
example content

metafields property

{{ page.metafields.someNamespaceName.key }}
some value