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.

eZ debug

Timing: Jan 19 2025 20:13:03
Script start
Timing: Jan 19 2025 20:13:03
Module start 'content'
Timing: Jan 19 2025 20:13:05
Module end 'content'
Timing: Jan 19 2025 20:13:05
Script end

Main resources:

Total runtime1.4256 sec
Peak memory usage4,096.0000 KB
Database Queries189

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.1797180.8125
Module start 'content' 0.00551.3025 769.9922435.5781
Module end 'content' 1.30800.1176 1,205.5703333.7813
Script end 1.4256  1,539.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.3261210.0002
Check MTime0.00170.1211210.0001
Mysql Total
Database connection0.00070.046810.0007
Mysqli_queries1.357595.21921890.0072
Looping result0.00190.13201870.0000
Template Total1.393597.720.6968
Template load0.00230.164720.0012
Template processing1.391197.580020.6956
Template load and register function0.00030.021510.0003
states
state_id_array0.00200.141610.0020
state_identifier_array0.00090.063120.0004
Override
Cache load0.00180.1296200.0001
Sytem overhead
Fetch class attribute can translate value0.00220.155120.0011
Fetch class attribute name0.00090.065420.0005
XML
Image XML parsing0.00050.032420.0002
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00500.3494210.0002
String conversion0.00000.000230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs