Limit the number of records displayed

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

Re: [Mercer Design] Limit the number of records displayed

By Jason - June 1, 2012

Hi,

You could try something like this:

list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
));

$firstNewsRecord = array();

if($newsRecords) {
$firstNewsRecord = $newsRecords[0];
}


In this example, $newsRecords is a list of all of your news articles. $firstNewsRecord is the first record from that list. These variables can be displayed separately.

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] Limit the number of records displayed

Sorry I cannot get this to work, I have it set up so that on the news page it pulls in the news which I have setup with a checkbox, because there are news articles for sport, art, etc and then the main news.

Here is a link to the page in question:
http://www.ardingly.com/testing_development/Ardingly_College_Sussex/News_Independent_Schools_Sussex/News_list.php

You will see that I want all the main news to appear in the middle but only the first one in the right hand area at the bottom. It works fine on this page:

http://www.ardingly.com/testing_development/index.php

Another thought is I have a featured article checkbox so that ticked article can appear in the main list of news and the featured area, but I'm not sure how to do that and to just show the featured article in the right hand area.

Re: [Mercer Design] Limit the number of records displayed

By Damon - June 6, 2012

Hi,

Can you send in one Support Request so we can take look at your code and CMS Builder setup:
https://www.interactivetools.com/support/email_support_form.php?priority=free

We can look into both these issues at the same time. Please include this in the "Summary of Problem textbox on the support form:

Limit the number of records displayed:
http://www.interactivetools.com/forum/gforum.cgi?post=93673#93673

MultiSearch results page:
http://www.interactivetools.com/forum/gforum.cgi?post=93674#93674

Thanks!
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/