template object
The template that renders the current page. It is available in the layout, in every section and in every snippet.
Properties
| Name | Type | Description |
|---|---|---|
name | string | The template name, for example product or collection |
file_name | string | The template file name, for example product.json |
layout | string | The layout of the template, or nil when the template has none |
liquid
{% if template.name == 'product' %}
<meta property="og:type" content="product">
{% endif %}