This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Setup & design » How to count the number of pages??

How to count the number of pages??

How to count the number of pages??

Wednesday 09 February 2005 2:36:12 pm - 2 replies

Dear all

I need your help ... please, i want a way to get count of pages in a specific template

ex: i need to know how many pages displayed in them the news titles or a gallery of pictures if each page carries 5 items

also i need to know how to specify in which page am i ??

Thanks in advance

Wednesday 09 February 2005 2:53:25 pm

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,


Sunday 13 February 2005 12:47:47 pm

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!

36 542 Users on board!

Forums menu

Proudly Developed with from