Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi there,
I want to have a few different 404 pages, depending on where the customer went wrong and identify the cases via the URL.
Let's say someone accesses a page myurl.com/234234234234324/orders/ I want to catch this case in an if statement
{% if handle contains '/orders' %}
Test
{% else %}
<div class="EmptyState">
<div class="Container">
<h3 class="EmptyState__Title Heading u-h5">{{ '404.general.title' | t }}</h3>
<p class="EmptyState__Description Text--subdued">{{ '404.general.content' | t }}</p>
<a href="{{ routes.root_url }}" class="EmptyState__Action Button Button--primary">{{ '404.general.button' | t }}</a>
</div>
</div>
{% endif %}
Now accessing the URL myurl.com/234234234234324/orders/ should give me back "Test", which it doesn't.
Maybe the order pages don't have a handle?
How else could I access the URL in this case?
Thanks,
Patrick
Any suggestions?
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025