Here are my channels and fields I need to get to work together.
Blog Channel (blog)
- Matrix Field (bodyMatrix)
- Gallery Block (gallery)
- Gallery Field (galleryInclude [entries])
- Gallery Block (gallery)
Gallery Channel (gallery)
- Matrix Field (galleryMatrix)
- Slide Block (slide)
- Slide Image Field (slideImage [assets])
- Slide Text Field (slideText)
- Slide Block (slide)
In my Blog Channel, I have a Gallery block inside a Body Matrix field. This Gallery block contains just an Entries relationship field that is pulling from my Gallery channel.
Inside the Gallery channel is a Matrix field as well, with a single block for slideImage and slideText.
This being my second day working with Craft, but years of experience with EE, how do I pull in the content from that Gallery entry and it's Gallery Matrix?
I've been able to pull in that Gallery title, but can't at all get the Gallery Matrix to output anything.
{% for gallery in block.galleryInclude %}
{{ gallery.title }}
<figure>
{% Gallery Matrix %}
<div><img src={{gallery image url}}"></div>
{% end Gallery Matrix %}
</figure>
{% endfor %}
I'm not even sure when I use 'gallery' above, if that's the right variable to use, but it works.