Forums / Developer / Problem with sub items and google navigator pagination

Problem with sub items and google navigator pagination

Author Message

Pierre SCALFATI

Tuesday 09 June 2009 12:29:18 am

Hi everybody,

I've a little problem with the page numbers which do not do their work despite the fact that my piece of code seems to be ok:


{include name=navigator
					 uri='design:navigator/google.tpl'
					 page_uri=$node.url_alias
					 item_count=$rubriques_count
					 view_parameters=$view_parameters
					 item_limit=$page_limit}

the page numbers are generated but the whole sub items of the folder are listed in each page. So when I click on a page number I have exactly the same articles listed on each page.

My $page_limit variable is fixed to 5 items, but I think that my problem comes from the way the items are created inside my EZP admin console. I have different folders in which I have items of a class called Experts (which gathers information fields like : first name, last name, speciality, domain of experience etc.).

Every time I create an "Expert" inside my folder it is inserted as if it was a new child node under that folder and it is graphically displayed like this :

- Economy (a folder)
 |
 |__John Doe
 |__Pierre Scalfati

etc...


And if you notice, for example in a classical article content which is created in a folder, you must click on the folder, first, to see at the bottom of the admin console the corresponding content.

So I think that every item of "Expert" class which is created under the folder is not considered by google page navigator as a sub-item but more as a separate node...or something like that. So How can I make my page numbers appear using this script in such configuration and why my items are not created as a usual item ?

Many thanks for your replies.

Pierre SCALFATI

Tuesday 09 June 2009 9:12:11 am

I found finally what was wrong with my pagination. It came from my fetch function which did not indicate the limits. Here is what I changed:

  {def $rubriques = fetch('content', 'list', hash('parent_node_id', $node.node_id, 'depth', 0, 'language', $node.object.current_language, 'offset', $view_parameters.offset, 'limit', $page_limit, 'sort_by', array( 'name', true() )))}

What was missing was the following parameter


'limit', $page_limit

$page_limit is defined with a value of 5 (for 5 items maximum displayed for each page).

Best Regards.