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.

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

eZ debug

Timing: Jan 19 2025 23:45:39
Script start
Timing: Jan 19 2025 23:45:39
Module start 'layout'
Timing: Jan 19 2025 23:45:39
Module start 'content'
Timing: Jan 19 2025 23:45:39
Module end 'content'
Timing: Jan 19 2025 23:45:39
Script end

Main resources:

Total runtime0.0146 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.3984152.6563
Module start 'layout' 0.00510.0028 742.054739.4922
Module start 'content' 0.00780.0047 781.546989.2734
Module end 'content' 0.01250.0020 870.820330.3047
Script end 0.0145  901.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002215.3115140.0002
Check MTime0.00106.7222140.0001
Mysql Total
Database connection0.00074.570410.0007
Mysqli_queries0.002819.116030.0009
Looping result0.00000.090010.0000
Template Total0.001610.810.0016
Template load0.00085.161110.0008
Template processing0.00085.558710.0008
Override
Cache load0.00053.231810.0005
General
dbfile0.00042.636280.0000
String conversion0.00000.042540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs