How do I pass a parameter down to a child layout?


#1

This is my code:

{% assign products = products_hash[{{page.product-collection}}] %}
<div class="page-header text-center">
  <h2>{{ page.title }}</h2>
</div>
{{ page.content }}
<div id="products" class="row list-group">
  {% for product in products %}
    <div class="item  col-xs-4 col-lg-4">
      <a href="{{ "/" | append: product.slug | prepend: page.product-collection | prepend: '/' | prepend: site.baseurl }}">
        <div class="thumbnail">
          <img class="group list-group-image" src="{{ "/assets/" | append: product.cover-photo | prepend: site.baseurl }}" alt="product image" />
          <div class="caption">
            <h4 class="group inner list-group-item-heading">{{ product.name }}</h4>
            <p class="group inner list-group-item-text">
              {{ product.short-description }}
            </p>
            {{content}}
          </div>
        </div>
      </a>
    </div>
  {% endfor %}
</div>

How do I pass the product parameter down into the child layout which will fill in the hole designated by {{layout}}?