Search results page

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

By gversion - February 2, 2013

Hello,

I can see that there are variables for displaying the page number and total number of pages on a search results page.

    - page <?php echo $listingsMetaData['page'] ?> of <?php echo $listingsMetaData['totalPages'] ?> - 

Are there similar variablesto show the number of records in the search results? For example

  - records 1-10 of 500 total records

Thank you,

Greg

By gregThomas - February 4, 2013

Hi Greg,

There is a meta variable called totalRecords that will display the total number of records retrieved, you could use it like this:

<?php echo $listingsMetaData['totalRecords'] ?>

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gversion - February 4, 2013

Hi Greg,

That is really useful to know. Is there a glossary of these variables available somewhere?

Thanks,

Greg

By gregThomas - February 4, 2013

Hi Greg

The best way to find out all of the variables in the meta array is to use the showme function. In the example you've given you could use it like this:

showme($listingsMetaData);

This function is also really useful for looking at the contents of getRecords functions, but can be used to look at the contents of any variable.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com