Not finding the relevant article.
5 posts by 2 authors in: Forums > CMS Builder
Last Post: September 22, 2011 (RSS)
I have a home page which has a summary of the article which links to a list of recent articles. These are fine, but when I want to read an article in more detail from the list it automatically reads the first article at the top of page. It has differing links for each one but some reason does not recognise them. Can you help? The link is:
http://www.heritagerailways.com/Testsite/media_home.php
Many Thanks Richard
Re: [rg1986] Not finding the relevant article.
By Jason - September 21, 2011
It looks like a minor problem with your getRecords call on med_newsArticle.php. If you could attach that page to this thread, I can take a look at the code and let you know what changes to make.
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] Not finding the relevant article.
By Footplate - September 21, 2011 - edited: September 21, 2011
Richard
Re: [rg1986] Not finding the relevant article.
By Jason - September 22, 2011
The problem here is you need to add a WHERE clause to your getRecords call to get the record specified in the URL.
Try this:
// load records
list($media_newsRecords, $media_newsMetaData) = getRecords(array(
'tableName' => 'media_news',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
That should take care of the issue for you.
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] Not finding the relevant article.
Your help is a appreciated! :)
Rich