Can't link to all detail pages

5 posts by 2 authors in: Forums > CMS Builder
Last Post: May 14, 2010   (RSS)

Re: [NigelGordijk] Can't link to all detail pages

By Jason - May 14, 2010

Hi,

If you could attach departments-clerks-boundaries-details.php, I'll take a look at it for you.

Thanks.
---------------------------------------------------
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] Can't link to all detail pages

Thanks, Jason. Here you go...

I've also attached the index page.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Can't link to all detail pages

By Jason - May 14, 2010

Hi,

The records from depts_introduction and contacts_department, are these records supposed to be the same every time the page loads?

What's happening, is you're pulling information from a number of different tables using
"where" => "whereRecordNumberInUrl(1)",

With this, the page will only load when the record number in all 3 tables are the same. The reason why it works for "Questionaire" is that its record number =1.

Try replacing the code where you get depts_introduction and contact_department records with this:

list($contacts_departmentRecords, $contacts_departmentMetaData) = getRecords(array(
'tableName' => 'contacts_department',
'allowSearch'=> false,
'limit' => '1',
));
$contacts_departmentRecord = @$contacts_departmentRecords[0]; // get first record

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

list($depts_introductionRecords, $depts_introductionMetaData) = getRecords(array(
'tableName' => 'depts_introduction',
'allowSearch'=>false,
'limit' => '1',
));
$depts_introductionRecord = @$depts_introductionRecords[0]; // get first record

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


Give that a try.

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/

Re: [Jason] Can't link to all detail pages

Perfect! Thanks so much, Jason.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net