Fall-back image puzzler....?

2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 10, 2012   (RSS)

Re: [Perchpole] Fall-back image puzzler....?

By Jason - September 10, 2012

Hi Perch,

You could try putting in a nested If statement like this:

<?php if ($record['icon']): ?>
<?php $recordTheme = mysql_get('icon_list', $record['icon']); $recordThemeIcon = getUploadRecords('icon_list', 'icon', $recordTheme['num']); ?>
<?php $recordIcon = $recordThemeIcon[0] ?>
<?php else: ?>
<?php $recordThemeIcon = getUploadRecords('category', 'icon', $record['category']); ?>
<?php if($recordIcon = @$recordThemeIcon[0]): ?>
// output $recordIcon from category
<?php else: ?>
// output fall back icon
<?php endif ?>

<?php endif ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/