How to count the number of pages??

How to count the number of pages??

Wednesday 09 February 2005 5:36:12 am - 2 replies

Author Message

Tom Couwberghs

Wednesday 09 February 2005 5:53:25 am

Do the same fetch-operation as you did to fetch the news or galleryitems, but use list_count or tree_count instead of list or tree.

If you have the number of items, divide it by 5 and than you can see how many pages there are.

Like this:

{ceil(div($treecount, 5))}

Hope this helps,

Tom

M M

Sunday 13 February 2005 3:47:47 am

Thanks a lot it works well

But i need an answer for two more questions if you please...

First: how to know in which page i am [ its number]

Second: if i want to display all numbers of pages in a combobox and each should be hyperlinked to its page

Thanks in advance

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.