I have a Layout with the outer HTML of a section with cards, much like the Repeater example in the docs. My Repeater has four fields. I can’t figure out how to tell the Layout to display the Repeater items.
Layouts only has direct access to the full output of its columns. So if your layout has a column named “main”, you only have [[+main]] and whatever is in that column will be rendered into that placeholder. That does not have access to something like [[+main.repeater.image]]
Does your repeater still the same template (“markup” ) as you posted before? If so, make sure those subfields are configured with the right keys “card-image” and “card-icon”.
When things don’t seem to get rendered the way you’d expect, it can be useful to check the resource in quick update. The content shown there is the end result of ContentBlocks’ parsing (but before MODX parses it further) so that may help pinpoint specific placeholders that aren’t getting set for whatever reason.
Yes, that’s the exact Repeater template. And those are all four the same as the fields’ keys.
This is what shows in Quick Update for each of the repeated blocks.
<div class="col-lg-4 col-md-6 d-flex align-items-stretch">
<div class="card">
[[+card-image]]
<div class="card-icon">
[[+card-icon]]
</div>
<div class="card-body">
<h5 class="card-title"><a href="">Our Mission</a></h5>
<p>Lorem ipsum dolor sit amet, consectetur elit, sed do eiusmod tempor ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</div>
</div>