Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
Hisashi Posted June 16, 2021 Share 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 Link to comment Share on other sites More sharing options...
Solution opentype Posted June 16, 2021 Solution Share 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 Link to comment Share on other sites More sharing options...
Hisashi Posted June 16, 2021 Author Share 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? Link to comment Share on other sites More sharing options...
Recommended Posts