Jump to content

Recommended Posts

Posted

I'm using pagination but I want to place a summary text somewhere in the template.

Basically my query has a limit=20 so somewhere on the page I want to say something like "Showing 21 through 40 of 290 results".

I can get the total results by doing my query again with $pages->count() unless this is not performant? But how do I know that I'm viewing 21-40 results? And on the last page where it might not be returning a full 20 pages, it would probably say something like "Showing 281-290".

I thought I could just do some math using the $input->pageNum and then calculating based on my limit=20. This just seems messy somehow. I'm looking for a better way unless there is no better way.

Thanks

Posted

Thanks, that makes sense, but templates are edited in the file system. 

Do we have access to the file system templates of the skyscraper demo? Or is there a way to view the template files from the demo admin?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...