Count TotalPages

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 7, 2008   (RSS)

By Djulia - January 7, 2008 - edited: January 7, 2008

Hi,

It would be possible to obtain the number of article on the pageList.php page ?

I would like to obtain a condition:

<?php if totalPages >= '5' : ?>
<?php if ($listDetails['prevPage']): ?>
...
<?php endif ?>

Thank you for your answer.

Julia

Re: [Djulia] Count TotalPages

By Dave - January 7, 2008

I think you may be looking for either $listDetails['totalPages'] or $listDetails['totalRecords']

There's a number of useful values in $listDetails. You can easily list them (or the contents of any variables) with the PHP function called print_r(). Try this:

<xmp><?php print_r($listDetails); ?></xmp>

It's a very handy when you want to see what values are available in $listDetails, or a $record, or an $upload field, etc. I use it all the time check what values are available and what they're set to.
Dave Edis - Senior Developer
interactivetools.com