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:
at the top of the page i am including this on, i need:
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.
<?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: [rez] hiding an error / include Q:
By Jason - April 5, 2011
Hi,
I think the best solution would be to to just put your list() code at the top of your include. That way you're guaranteed to have the variable $social_column_picsRecords each time you use the include.
Hope this helps.
I think the best solution would be to to just put your list() code at the top of your include. That way you're guaranteed to have the variable $social_column_picsRecords each time you use the include.
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/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
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.
Great to know.