Search code examples
templatesincludeshopify

Shopify: Include a template into another template


I'm trying to customize a Shopify theme and I want to include a template into another template, but this seems to work for snippets only.

Detailed: I want to add the login / register forms into a dropdown menu in the header which appears onlick. So I added to my theme.liquid file the following code:

{% include 'customers/login' %}

But this returns the following error:

"Liquid error: Could not find asset snippets/customers/login.liquid"

This means that include can be used only for snippets? No template can be included / called into another? Or am I missing something?

Any way around this or a direct command for templates / pages?


Solution

  • No Shopify template can be included / called into another template. You should rely on snippets.