Hi there, hoping for a bit of help. I’m working on a custom module that features a testimonial slider that can read the full testimonial in a modal. The issue that I’m facing is the modal window needs to be outside and above the for loop.
My question is, using HubL/variables, etc — is there a way to store the testimonial quote and modal name from each loop iteration and use it in the code above.
<div class="page-center">
<div id="test" class="modal-window">
<div><a href="#" title="Close" class="modal-close">Close</a>
<h1>Voilà!</h1>
<div>A CSS-only modal based on the :target pseudo-class. Hope you find it helpful.</div>
</div>
</div>
{%- for testimonial in module.testimonial -%}
<div class="pwr-rich-text pwr-testimonial__quote">
{{ testimonial.quote }} <a href="#test">Read More</a> </div>
{%- endfor -%}
Hopefully this makes sense and thanks in advance!