Skip to content

template object ​

The template that renders the current page. It is available in the layout, in every section and in every snippet.

Properties ​


NameTypeDescription
namestringThe template name, for example product or collection
file_namestringThe template file name, for example product.json
layoutstringThe layout of the template, or nil when the template has none
liquid
{% if template.name == 'product' %}
  <meta property="og:type" content="product">
{% endif %}