I’m trying to make a modular page with a collection as one of the modules.
Something like this:
Home
- Rotator (module 1)
- Tagline (module 2)
- Content (module 3)
- Capsules (collection of call to actions)
Home has an md called modular.md like this:
content:
items: '@self.modular’
order:
by: default
dir: asc
custom:
- _mission
- _content
- _capsules
Capsules has an md called capsules.md like this:
content:
items: '@self.children’
order:
by: date
dir: asc
limit: 3
pagination: false
Then in templates, I have a modular.html.twig. What do I do for the template for capsules? It should be in the modular folder, right, and have a regular collection?
{% for p in page.collection %}
<div class="col-md-4">
<div class="capsule-gates">
<a href="{{ p.link }}" class="btn btn-wide icon-left"><h3>{{ p.title}}</h3>
</div>
</div>
{% endfor %}
It’s not pulling the capsules, so I have something not hooked up correctly somewhere, any ideas?
Then in templates, I have a modular.html.twig. What do I do for the template for capsules? It should be in the modular folder, right, and have a regular collection?
{% for p in page.collection %}
<div class=“col-md-4”>
<div class=“capsule-gates”>
<a href=“{{ p.link }}” class=“btn btn-wide icon-left”><h3>{{ p.title}}</h3>
</div>
</div>
{% endfor %}
It’s not pulling the capsules, so I have something not hooked up correctly somewhere, any ideas?