I'm trying to build an accordion in my matrix field (that also holds entries for a slideshow, button, image, etc).
Im having trouble with getting each entry to go inside < div id="accordion">< /div> and not repeat this accordion div over and over.
{% elseif block.type == "sectionaccordion" %}
<div id="accordion">
{% for block in entry.sectionaccordion %}
<div class="accordiontitle">{{ block.accordionTitle }}</div>
<div class="accordion-content default">
{{ block.accordionText }}
</div>
{% endfor %}
</div>
With this setup, I keep getting Craft\EntryModel and its behaviors do not have a method or closure named "sectionaccordion".
entry.sectionaccordion
another matrix field or a block inside another matrix? You can't do matrix within a matrix inside Craft...