Hello everyone,
I’ve come across a changelog that notes the {% include %} tag is being deprecated in favour of the new {% render %} tag. I’m aware that previous include tags are keeping their functionality, but the new render tag must be included going forward.
The way in which we render our content on pages that aren’t the homepage is using a single section that contains the fields for every content block we have. Then we loop through these block and include the required snippet like so:
{% for section in section.blocks %}
{%- assign snippet_name = 'section-' | append: section.type -%}
{% include snippet_name %}
{% endfor %}
However, it seems to not allow me to use a variable in place of the string or allow the snippet access to the data in the parent section which will completely break the site using our current strategy.
Do you have any recommendations on how to solve this issue? Are there new updates coming that will make this change make sense?
Any help would be greatly appreciated!