Detail Display

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

Re: [Duches77] Detail Display

By Chris - February 3, 2010

Hi Duches77,

There's nothing I can see in your code which might be causing this problem. I'm wondering if the problem could be caused by the whereRecordNumberInUrl() function and the URLs you're using. Do you have some example URLs of working and 404 pages?
All the best,
Chris

Re: [Duches77] Detail Display

By Chris - February 5, 2010

Hi Duches77,

Ahh, I see what's going on. You'll want to remove these lines from your viewers:


'where' => whereRecordNumberInUrl(1),


The whereRecordNumberInUrl function is meant to work with the default detail viewer urls (e.g. "articleDetails.php?my-article-title-3".) It looks for a number at the end of the URL and uses that to look up the record number (i.e. num field.)

You're using another field to reference records (product_id_sku), which is perfectly fine, but you'll need to get rid of the whereRecordNumberInUrl filter.

I hope this helps! Please let me know if you have any questions.

P.S. The reason your first two links were working was coincidental: RC01 has num=1, and AU02 has num=2!
All the best,
Chris

Re: [chris] Detail Display

Thanks so much, Chris! That was exactly it.
-----
~Jessica Sullivan, Crystal Realm Designs.