QUANTM7 Docs
QuillObjects

Policy

The policy object for legal pages like privacy, terms, and returns.

The policy object holds a legal page like your privacy notice, terms of use, or return rules. These are stored apart from normal pages and each one has a type.

Properties

PropertyTypeDescription
policy.idnumberThe unique policy ID
policy.titlestringThe policy title
policy.handlestringThe URL slug
policy.urlstringThe full URL path
policy.policy_typestringThe type of policy (see below)
policy.contentstringThe body text as HTML
policy.published_atstringWhen it was last saved

Policy types

TypeDescription
privacy_policyPrivacy notice
terms_and_conditionsTerms of use
returns_and_refundsReturn and refund rules
shipping_policyShipping info
cookie_policyCookie notice
accessibility_statementAccess needs
customAny other type

Listing all policies

Use the global policies array to list all your live pages. This is most often used in the footer:

<ul class="footer-policies">
  {% for policy in policies %}
    <li><a href="{{ policy.url }}">{{ policy.title }}</a></li>
  {% endfor %}
</ul>

Showing a specific policy

On a single policy page, show the title, body, and date:

<article class="policy">
  <h1>{{ policy.title }}</h1>
  <div class="policy-content">
    {{ policy.content }}
  </div>
  {% if policy.published_at %}
    <p class="policy-date">Last updated {{ policy.published_at | date: '%d %B %Y' }}</p>
  {% endif %}
</article>

You can check the type to show each link with its own label:

{% for policy in policies %}
  {% if policy.policy_type == 'privacy_policy' %}
    <a href="{{ policy.url }}">Privacy</a>
  {% elsif policy.policy_type == 'terms_and_conditions' %}
    <a href="{{ policy.url }}">Terms</a>
  {% elsif policy.policy_type == 'returns_and_refunds' %}
    <a href="{{ policy.url }}">Returns</a>
  {% endif %}
{% endfor %}

On this page