display image from another table - showing only one

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 6, 2010   (RSS)

Re: [Deborah] display image from another table - showing only one

By Chris - September 2, 2010 - edited: September 2, 2010

Hi Deborah,

Your head code looks good, except that I don't think you'll need this line:

$logo_uploadsRecord = @$logo_uploadsRecords[0]; // get first record

I think you'll want to replace your body code (including the getRecords() call) with something like this:

<?php foreach($logo_uploadsRecords as $logo_uploadsRecord): ?>
<?php foreach ($logo_uploadsRecord['logo'] as $upload): //display logos selected from list in logo_uploads table ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath2'] ?>" />
<?php endif ?>
<?php endforeach ?>
<?php endforeach ?>


Does that help? Please let me know if you have any questions.
All the best,
Chris

Re: [chris] display image from another table - showing only one

Chris, You provided the perfect solution! I now see the full list of selected logos.

Thank you for your prompt assistance. I continued to be awed by the "power of CMS Builder" as well as the company's excellent support via this forum.

~ Deborah

Re: [Deborah] display image from another table - showing only one

By Chris - September 6, 2010

Hi Deborah,

Glad I could help, and thanks for the kind words! :)
All the best,
Chris