0
votes

I was wondering if it's possible to target /app/ pages using liquid flow controls?

I'm trying to exclude a particular element from showing up on one of our app pages. The app page uses our layout/theme.liquid file when it loads. Wondering if there's a way I can set a condition to look for app based pages like we do for other template/page conditions like {% if template == 'something' %}

1

1 Answers

0
votes

A call to any Proxy is going to result in data being returned. So if you have a link in your Liquid to a Proxy, Shopify could possibly navigate there eg: /app/fizzbuzz and render what your Proxy returns as Liquid. In that case, you'd know you're on /app/fizzbuzz after the page is loaded, so a quick inspection of the URL would let you run JS.

A call from a link results in Shopify rendering the content_for_layout, if your element is in there don't include that element.

Would be helpful to know how you are using the Proxy to give you more details. Most people use it as an Ajax call for JSON and then render the returned data. I assume you are not doing that.