What's the best practice for using Include vs Render for snippets in landing pages?

Topic summary

A developer is customizing landing pages for different schools using Shopify Liquid templates. Their current approach uses {% include SchoolName %} with a variable, which works for snippets but fails when trying to use {% render SchoolName %} because render doesn’t accept variables the same way.

Current Challenge:

  • The include tag works with dynamic variables but may be deprecated
  • The render tag doesn’t work with variables in the same manner
  • Snippets contain custom JavaScript code

Community Response:
Another user notes that include can cause performance issues with Shopify embedded app blocks. They suggest that render can still accept variables using this syntax:

{% render 'liquidfile', variable: 'yourvalue' %}

The discussion centers on finding the best practice for dynamically rendering school-specific content while avoiding deprecated methods and performance problems.

Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

I have a landing page that customize for each school we sell to. The landing page template currently has the following:

{% assign SchoolName = page_title %}
{% include SchoolName %}

and that renders a snippet named for the school. I create a snippet with the school name and custom information.

If I use {% render SchoolName %}

it does not work because render doesn’t like variables.

Is there a better/not deprecated/best practice way to do this?

My snippets have a little bit of JS which work as snippets but not if I fully customize the landing page

In our experience using includes may cause performance issues with shopify embedded app blocks.

We run an automated check in one of our apps to detect a popular script that uses “include” instead of “render” that may cause bugs to our app.

You can still use variable with render, is just that you have to follow this syntax:

{% render 'liquidfile', variable: "yourvalue" %}