List inside the details page

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

By Mohaukla - November 1, 2012

I have my list page that shows each section (documents and their uploads)

When clicking on a document link for the details page it works correctly but I have also included a list of the other documents from that section.

The problem is that the list ends up being only 1 document and it's the same one that is showing up in the details.

I am sure this is a simple fix but I cannot seem to find the solution.



DETAILS PAGE: http://www.capstanag.com/presentations_full.php?Test-Presentation-1
require_once "C:/Webspace/resadmin/mmoyers/capstanag.com/www/cmsAdmin/lib/viewer_functions.php";


list($presentations_powerpointsRecords, $presentations_powerpointsMetaData) = getRecords(array(
'tableName' => 'presentations_powerpoints',
'allowSearch' => '0',
));

list($presentations_powerpointsRecords, $presentations_powerpointsMetaData) = getRecords(array(
'tableName' => 'presentations_powerpoints',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$presentations_powerpointsRecord = @$presentations_powerpointsRecords[0]; // get first record

// show error message if no matching record is found
if (!$presentations_powerpointsRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}


Then in the page
<div class="text" style="padding-left:10px; padding-top:10px; padding-right:15px">
<span class="Titles">Presentations / PowerPoints: <?php echo $presentations_powerpointsRecord['title'] ?></span>
<p class="text">
<?php echo $presentations_powerpointsRecord['content'] ?><br />
<?php foreach ($presentations_powerpointsRecord['powerpoint_upload'] as $upload): ?><a href="<?php echo $upload['urlPath'] ?>"><strong>DOWNLOAD</strong></a><?php endforeach ?><p>&nbsp;</p>
</p>
<p class="SubTitles">All Presentations:
</p>
<?php foreach ($presentations_powerpointsRecords as $record): ?>
<p><span class="SubTitles"><?php echo $record['title'] ?>:</span><br />
<?php foreach ($record['powerpoint_upload'] as $upload): ?> <a href="<?php echo $upload['urlPath'] ?>">Download</a><?php endforeach ?> - <a href="<?php echo $record['_link'] ?>">More Information</a>
</p>
<?php endforeach ?>
<br /><br />
</div>

Michael Moyers



Owner of Just Rite Design Inc. A growing network of professionals in web design, graphic design, flash development, programming, and audio & video productions.



"Due to budget constraints, the Light at the end of the tunnel will be temporarily out!"