learnshopify.dev/Workspace
code reading

Sarah's PDP block. Trace it, then answer.

{% assign guide = product.metafields.custom.brew_guide.value %}
{% if guide %}
  <aside class="brew-guide-card">
    <p class="brew-guide-card__eyebrow">Recommended brew method</p>
    <h3 class="brew-guide-card__name">{{ guide.name }}</h3>
    <p class="brew-guide-card__summary">{{ guide.summary }}</p>
    <dl class="brew-guide-card__specs">
      <div><dt>Grind</dt><dd>{{ guide.grind }}</dd></div>
      <div><dt>Ratio</dt><dd>{{ guide.ratio }}</dd></div>
      <div><dt>Time</dt><dd>{{ guide.steep_time }}</dd></div>
    </dl>
    <a class="brew-guide-card__link" href="/pages/brewing/{{ guide.system.handle }}">
      Full {{ guide.name }} guide
    </a>
  </aside>
{% endif %}
1. Why does line 1 end in `.value`?
2. A coffee has no brew guide linked. What renders?
3. How does this differ from looping `metaobjects.brewing_method.values`?
4. Remove the `{% if guide %}` guard. What ships?
5. Which is the metaobject in this code?
0 / 1 task solved