Manipulating How single & list of records are displayed

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 30, 2009   (RSS)

By Mel - November 28, 2009

Hi,

I have a table name bios, this is the master table for all records

To display the record list for a specific location lets say Manchester I use the

list($biosRecords, $biosDetails) = getRecords(array(
'tableName' => 'bios',
'perPage' => '10',
'where' => ' areas_covered LIKE "%manchester%" ',
'orderBy' => 'view_order',

));

to display what parts of the master record I want to show I use this and add the fields that I want to show

<?php foreach ($biosRecords as $biosRecord): ?>
<?php echo $biosRecord['name'] ?>
etc
etc
etc
<?php endforeach ?>

and much the same set up for a single record page which works fine

What I want to do is this:

On both the Complete Record list for Manchester and the Details Page for individual records, I want to leave out certain fields in the display if a record meets a certain condition

So say I add a new field called area1 to the master table is it then possible to do an elseif to say if area1=y then display the record using this layout instead (certain fields would be omitted) ?

Thanks - Mel

Re: [gkornbluth] Manipulating How single & list of records are displayed

By Mel - November 30, 2009

Hi Jerry,

Thanks for the comprehensive reply, got it doing what I want it to do.

Will be getting the book[:)]