0
votes

Throughout my liquid files, I see lots of conditional statements based on the current template, like this:

{% if template contains "product" %}
  (do something)
{% endif %}

But I have an app installed that created it's own page:

MyStoreName.com/apps/store-locator

- which uses no template.

I need to add some code to my theme.liquid file which only executes on this app page. Is there any other way to identify the page?

1

1 Answers

1
votes

Does the page have a title that Shopify can spit out using {{ page_title }}? If so, you should be able to do

{% if page_title == 'store-locator' %}
    {% code goes here %}
{% endif %}