I’m converting a legacy store to theme blocks architecture.
A common approach used by the devs on the Horizon theme throws a ‘severe’ error. I would like to use a similar approach but I don’t know the consequences of ignoring the error.
{% capture card_image %}
{% content_for 'block',
type: '_collection-card-image',
id: 'collection-card-image',
closest.collection: collection,
parent_block_id: block.id %}
{% endcapture %}
{% capture children %}
{% content_for 'blocks', closest.collection: collection %}
{% endcapture %}
{% render 'collection-card',
card_image: card_image,
children: children,
block: block,
collection: collection,
section: section
%}
… throws “Do not capture `content_for “block” / theme-check [CaptureOnContentForBlock]”
The documentation left me none the wiser: “Identifies the usage of content_for “block” inside the capture tag, as it’s restricted to enforce static block rendering at its expected location.”
Can someone explain what the error is for, its actual severity and performance implications, and / or whether I can make like the official devs and just ignore it completely?