If, then statements pulling optional / list content from various tables

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

Re: [kimamel] If, then statements pulling optional / list content from various tables

By zip222 - April 22, 2011

I think this is what you're looking for...

<?php if ($videosRecords): ?>
<h2 style="padding-top:20px;"><?php echo $service_support_mainRecord['videos_title'] ?></h2>
<?php endif ?>

Re: [zip222] If, then statements pulling optional / list content from various tables

By (Deleted User) - April 22, 2011

Perfect. Thank you. I was trying to stuff too much into my if statement.

Re: [kimamel] If, then statements pulling optional / list content from various tables

Hi Kimamel,

Actually you can set all kinds of complex conditions using if statements.

Like: <?php if ($your_tableRecord['your_field'] == 'apples'): ?>

for a single criteria, or for multiple criteria:


<?php if ($your_tableRecord['field_a'] == 'apples' && $your_tableRecord['field_b'] == 'bananas' && $your_tableRecord['field_c'] ==
'pears'): ?>

There are a lot of specific recipes regarding things that you can do with both simple and complex "if" statements in my CMSB Cookbook at http://www.thecmsbcookbook.com

Hope that helps...

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php