Closed taverin closed 11 years ago
Not quite sure what you are trying to do ... basically you are looping through 2 folders levels of items, and then according to your code, you are trying to list images from the current page, eg. not from the loop.
If you check the partials/assets/images.html, you will see it references the current page with {% for image in page.images %} ... Personally, I would skip using the image partial ... Its basically just an example of how to get all images in current page, which can be done with a few lines anyway and added properly. In your case, you would probably use something like:
{% for image in child.images %}
<img src="{{ image.url }}" alt="{{ image.title }}" width="{{ image.width }}" height="{{ image.height }}">
{% if image.description %}
<em>{{ image.description }}</em>
{% endif %}
{% endfor %}
That did it!
Thank you very much!
Diving back into Stacey 3.0 after building a few projects with Stacey 2.3 a while ago.
I have a single page portfolio with project items opening as modal boxes. For some reason, the images (and only the images) are opening all in the very first item. I am not used to using Twig so I am still learning here. Thank you in advance.
Here is the code that populates every modal box: