Default Viewer Record

6 posts by 3 authors in: Forums > CMS Builder
Last Post: June 2, 2010   (RSS)

Re: [mark99] Default Viewer Recorder

By mark99 - May 27, 2010

Just realised that using 'where' => " category LIKE '%Consumer Cameras%' ", on a detail viewer page doesn't work either as it will then ONLY display the first record for that category and not the others regardless of whats in the URL.

Re: [mark99] Default Viewer Record

By Dave - May 27, 2010

Hi mark99,

Try this:
'where' => whereRecordNumberInUrl(0),

The value in the brackets is what's used if no number is found in the url. So 0 means match nothing.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Default Viewer Record

By mark99 - May 29, 2010

That worked once but oddly it only displayed the "No record found!" message, no other content on the page was displayed.. just a blank page with that text. This is strange because the viewer file suggests that you should see "No record found!" at the bottom of all the pages existing content.

However, when I went to reload the page again it then started displaying standard browser error 404 (page not found) errors. The viewer would of course still work with a correct detail.php?TITLE-NUM call but now I'd just get 404's if you went to detail.php directly. Is that as intended? The 404's vanish, understandably, when you add '1' back into that line.

Re: [mark99] Default Viewer Record

By Jason - May 31, 2010

Hi Mark,

Could you provide a link to the page in question so I can see what's happening?

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] Default Viewer Record

By mark99 - June 2, 2010

Never mind, the problem was staring me in the face.. I just had to tweak a few things:

if (!$isp_listRecord) {
// header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}