Creating a list page with information from 2 multi record editors

5 posts by 3 authors in: Forums > CMS Builder
Last Post: June 1, 2009   (RSS)

By gkornbluth - May 25, 2009 - edited: May 29, 2009

Hi All,

Stumped again...

I’m trying to create a list page using information from 2 multi record editors. “Exhibitions”, and “Opening Receptions”.

Both editors pull a check box list of event titles from a master events list multi record editor and the specific event title then is checked on each record in the “Exhibitions” and “Opening Receptions” editors.

The event editor has all of the permanent event information and the other has opening reception information only for those events. (I’m using 2 editors so that the “Opening Reception” information can automatically be hidden after the reception date has passed)

I can’t seem to get the “Opening Reception” information to display with the corresponding event. In spite of the “where” code in the head, all of the “Opening Reception” dates show in each event listing.

I’ve tried a number of approaches and am out of ideas.


The link to the page I’m trying to create is: http://www.lkmix.com/index3.php


Thanks,

Jerry Kornbluth

Here’s the code that I’m using in the head:

<?php

require_once "/hsphere/local/home/craftgallery/lkmix.com/cmsAdmin/lib/viewer_functions.php";

list($exhibitionsRecords, $exhibitionsMetaData) = getRecords(array(

'tableName' => 'exhibitions',

));


list($opening_receptionsRecords, $opening_receptionsMetaData) = getRecords(array(

'tableName' => 'opening_receptions',

'where' => "exhibition LIKE '%" .mysql_real_escape_string(@$_REQUEST['sort_exhibition']). "%'",

));


?>


And in the body (without the styling info):

<table>

<?php foreach ($exhibitionsRecords as $record): ?>

<tr>

<td><a href="<?php echo $record['_link'] ?>"><?php echo $record['exhibition'] ?></a>

<br /><?php echo $record['sub_title'] ?><br />

<br />

Show Dates: <?php echo date("D, M jS", strtotime($record['opening_date'])) ?> - <?php echo date("D, M jS, Y ", strtotime($record['closing_date'])) ?><br />

<?php echo $record['days_and_times'] ?></p><hr color="#C70000" width="300" /<br />Opening Reception: <?php foreach ($opening_receptionsRecords as $record): ?><?php echo date("D, M jS", strtotime($record['reception_date'])) ?><?php endforeach; ?></td>

</tr> <?php endforeach; ?>

</table>
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

Re: [gkornbluth] Creating a list page with information from 2 multi record editors

By ross - May 26, 2009

Hi Jerry

Thanks for posting!

I think I am going to need a better idea of how you have everything setup.

It sounds like you are actually dealing with three sections. Events, Exhibits and Opening Receptions.

From there, I think each event has a bunch of events but only one opening reception. You have all the event's main details right in the event table. Each exhibit is assigned to a specific event by the title of the event (which you do with a multi select menu). The same thing happens with the Opening Receptions.

Does that sound about right? Let me know if I am on the right track and we'll go from there.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Creating a list page with information from 2 multi record editors

By gkornbluth - May 29, 2009

Hi Ross,

If you have a moment that either you or someone can revisit this, I'd be grateful.

Thanks,

Jerry
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

Re: [gkornbluth] Creating a list page with information from 2 multi record editors

By Dave - June 1, 2009 - edited: June 1, 2009

Hi Jerry,

Can you email me CMS and FTP login details to dave@interactivetools.com so I can take a look at the setup? That will be the quickest way for me to determine the issue. Note: Email, don't post login details to the forum.

Also, please include a link to this post.

Thanks, hope that helps!
Dave Edis - Senior Developer
interactivetools.com