Title: When the sun goes down
Content: That's when the fun begins
Author: Mickael Jackson
Variables defined in parent’s scope can be passed to the partial template by listing them as parameters on the render tag.
output
Content: That's when the fun begins
Author: Mickael Jackson
input
{% render 'components/card1', title: single-object.title, content: single-object.content, author: single-object.author %}
components/card1.liquid
<article>
<h4>Title: {{ title }}</h4>
<p>Content: {{ content}}</p>
<p>Author: {{ author }}</p>
</article>
_data/single-object.json
{
"title": "When the sun goes down",
"content": "That's when the fun begins",
"author": "Mickael Jackson"
}