Hi,
I have one grid field with a maximum of 4 rows, every row is a file to allow editors to upload from 1 to 4 images.
The first image is required and others are optional.
First image: main_image
Optional images:
additional_image_1 additional_image_2 additional_image_3 additional_image_4
To display the required image in template i use this tag:
{product_images:main_image}To display additional images i want to use a conditional tag in template. I’ve tried with:
{if product_images:additional_image_1} <img > {/if}It doesn’t work. Anybody can give me directions of how code should be?
Thank you.
With grid you would be outputting your images in a loop, so ee will only display whatever is stored, whether it’s 1 or all 5 images. Review these docs, if you haven’t yet: https://ellislab.com/expressionengine/user-guide/fieldtypes/grid.html
If you mean something else, post back with more of your template code.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.