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 get Next, Previous, and...

How to get Next, Previous, and numbered page links

How to get Next, Previous, and numbered page links

Monday 07 April 2003 4:56:57 pm - 6 replies


I have been playing with ezPublish, and the demo. Is there any example template code to get "Next", "Previous", and the numbered page links like appear at the bottom of this forum for example? I know it will have to do something with offset, but I can't get things to be generic enough to always work. Any pointers?


Tuesday 08 April 2003 11:28:58 am

You can use the generic navigators which are shipped with eZ publish, they require some input variables and will automatically generate the required html.

For instance:
{include name=navigator

uri: The template to include, you can also use simple.tpl. It can also be a good idea to look at these templates to so how it is done.
page_uri: The uri to the current page, the offset will be appended to this uri.
item_count: The maximum number of items the list contains
view_parameters: Parameters which are specific to views, contains for instance offset. Might be extended in the future.
item_limit: The maximum number of items on this page

Wednesday 09 April 2003 8:13:27 pm

Thank you! This is working great!

Tuesday 15 April 2003 10:41:07 pm


Its not clear where we are supposed to set the variables - in the google.tpl/simple.tpl page or in the view page?

For example - I would like to show 10 news stories on the first page. Can someone enlighten me?


Modified on Wednesday 16 April 2003 8:39:30 am by Jonathan Stubbs

Wednesday 16 April 2003 10:16:56 am

You set it in the view. Just copy the template code shown earlier and try changing some parameters to understand how it works.

Here's an example with 10 items per page, a total of 56 items and the current offset is 20 (page 3).
{include name=navigator

Normally view_parameters is set to use the local $view_parameter variable which is supplied from the view code.

Wednesday 14 May 2003 11:01:55 pm

when I click on links (1,2,3 ....)
htis error appears
The object is not available."
on page ..../content/view/full/16/offset/5
/content/view/full/16 - works great
can you help me

my code:
{include name=navigator


Modified on Thursday 15 May 2003 12:04:25 am by di sho

Saturday 08 October 2005 3:41:37 pm

It seems there is a bug in the template simple.tpl, you have to change in the code "/offset/" to "/(offset)/"


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

36 542 Users on board!

Forums menu

Proudly Developed with from