Limiting Records Displayed to 100
My MLS has a requirement that no one online can ever have access to more than 100 of their records at a time. How do I limit my list view page so it only finds the first 100 records at any point in time (regardless of if it's being searched on or not).
Most real estate sites by the arrows that jump pages will say, "Your search returned X records, only the first 100 are displayed," when it goes over 100.
Thanks in advance for the help.
Try 'limit' => '100',
in your viewer's load records call
You can also set up separate 100 record pages with previous and next links.
Look at your code generator and you should see the options you need. Then just paste code into your viewer as required.
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Thank you for your assistance. Unfortunately it doesn't work. I get the following error:
Can't set both 'perPage' and 'limit' or 'offset' options at the same time, choose one!
The goal is to show 10-12 records on a page (with arrows when applicable) but limit the overall search results to 100 (plus notify the user when there were more than 100 so they keep searching and/or narrow their search criteria).
I believe the goal of this rule is to make it more difficult for datascraping. Without it someone could set a bot to search the site with wide open criteria and just have it keep clicking on the next arrow until it scraped the whole DB.
Anyway, haven't quite figured out the way around this.
Thanks again though