Hisashi Posted June 16, 2021 Posted June 16, 2021 Hello, I'm trying to get multiple image upload field to work and I'm just getting frustrating results, could anyone help me? When I put an image it works, more than one it breaks. -------- Current settings: I added in Pages > templates > record {$record->customFieldDisplayByKey('upload_img', 'display')|raw} Result: So I changed code in record to <img class="ipsImage" src="url/uploads/{$record->customFieldDisplayByKey('upload_img', 'display')|raw}"> Result: When will I put more than one image Result: Does anyone know how to fix this? To be able to display multiple images
Solution opentype Posted June 16, 2021 Solution Posted June 16, 2021 Something to start with: {{if $formValue}} <div class="ipsGrid ipsGrid_collapsePhone"> {{foreach $value as $file}} <div class="ipsGrid_span4 ipsSpacer_bottom"> <img src="{file='$file' extension='cms_Records'}" class="ipsImage"> </div> {{endforeach}} </div> {{endif}} Hisashi and bradl 2
Hisashi Posted June 16, 2021 Author Posted June 16, 2021 10 minutes ago, opentype said: Something to start with: {{if $formValue}} <div class="ipsGrid ipsGrid_collapsePhone"> {{foreach $value as $file}} <div class="ipsGrid_span4 ipsSpacer_bottom"> <img src="{file='$file' extension='cms_Records'}" class="ipsImage"> </div> {{endforeach}} </div> {{endif}} Amazing, it worked well thank you!! Since I'm going to use large images 1200x1800, I removed line <div class="ipsGrid_span4 ipsSpacer_bottom"></div> It worked well, is there a problem with that?
Recommended Posts