Detecting Replo Content with Liquid

  • Updated

Replo produces a standardized template which includes replo. in the template.

Pages

To detect whether the current page is a Replo page in Liquid, you can use the following snippet:

{% if template.name contains "replo" %}
<!-- Put HTML which only applies to Replo pages here -->
{% endif %}

Similarly, to exclude certain code on Replo pages, you can use the following snippet:

{% unless template.name contains "replo" %}
<!-- Put HTML which only applies to Replo pages here -->
{% endunless %}

Was this article helpful?