Unfortunate;y I am at a loss how to accomplish.
I have the below to show Features with a top_photo in my festivals table.
Can you please tell me how to also include in the random display Features in my Vendor table with a top_photo.
Thanks in advance
Larry
// load records for featured festivals
list($festivalsRecordsFEATURED, $festivalsMetaData) = getRecords(array(
'tableName' => 'festivals',
'where' => ' featured LIKE "1" ', // if checkbox for featured is checked
'limit' => '5',
'orderBy' => 'RAND()',
'loadUploads' => true,
'allowSearch' => false,
));
<?php foreach ($festivalsRecordsFEATURED as $record): ?>
<?php if ($record['top_photo']) : ?>
<?php foreach ($record['top_photo'] as $index => $upload): ?>
<p><a href="<?php echo $record['_link'] ?>">
<img src="<?php echo htmlencode($upload['thumbUrlPath']) ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" />
<br />
<?php echo htmlencode($record['title']) ?>
</p>
<?php endforeach ?>
<?php endif; ?>
<?php endforeach ?>