hiding an error / include Q:

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 5, 2011   (RSS)

By rez - April 5, 2011 - edited: April 5, 2011

If for example, I have in an include:
<?php foreach ($social_column_picsRecords as $record): ?>


<?php foreach ($record['image'] as $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" />
<?php endforeach ?>
<?php endforeach ?>


at the top of the page i am including this on, i need:


list($social_column_picsRecords, $social_column_picsMetaData) = getRecords(array(
'tableName' => 'social_column_pics',
));


Can that list code go in the include somewhere instead? It kind of puts a damper on the include convenience.

Also, if the top list code is not in the include file and missing from the page its loading into, how can I hide the error? I would rather just not display it to the visitor and visually realize my mistake when viewing the page.


thanks.

Re: [Jason] hiding an error / include Q:

By rez - April 5, 2011

Thanks Jason. So I guess as long as the list comes before the viewer code, it can go anywhere. Didn't realize that. I thought it had to be the first thing on the page. I gues that's just the safest place when you are instructing new users.

Great to know.