Forums / Developer / Pagination in a FrontPage block: $view_parameters unknown

Pagination in a FrontPage block: $view_parameters unknown

Author Message

Victor Dujardin

Monday 06 April 2009 9:32:04 am

Hi everyone,

I am trying to do some pagination in a block using:

{include name=navigator
        uri='design:navigator/google.tpl'
        page_uri='/L-Actu'
        item_count=$articleCount
        view_parameters=$view_parameters
        item_limit=3}

But I have an issue with the $view_parameters variable: I got the following error:

Unknown template variable 'view_parameters' in namespace 'ContentAttribute:ContentAttributeBlockView'

I tried to solve it by using $#view_parameters and $module_result.view_parameters but with no results.

Could anyone explain why I can't retrieve the view_parameters variable and how to do retrieve it?

Thank you.

Victor

Victor Dujardin

Tuesday 14 April 2009 1:10:38 am

Anyone?

Philip K.

Wednesday 15 April 2009 8:42:11 am

As far as I know, both $view_paramters and $module_result variable are not available in a frontpage.

Linux is like a wigwam; no windows, now gates, and apache inside!

Victor Dujardin

Thursday 16 April 2009 2:49:00 am

Thank you for your answer Philip, I was getting desperate not getting any.

Ok, so as far as you know, they cant' be retrieved, but do you know why?
Or if anybody else has an explanation, this would be greatly welcome.

And regarding my aim (to paginate in a frontpage block), I am thinking of javascript. But is there any eZ easier way to do it?

Any help would be greatly appreciated.

Thank you.

Victor

Gaetano Giunta

Thursday 16 April 2009 5:27:54 am

Search better in these forums, and you will find the answer...

In short: you can override the standard ezflow templates from eZ Publish, and pass the view_parameters var all the way down from the node template to the block template
(iirc the path is: node tpl -> attribute (patgelayout) tpl -> block tpl) using

{include uri='design:etc....tpl' view_parameters=$view_parameters }

Principal Consultant International Business
Member of the Community Project Board

Victor Dujardin

Friday 17 April 2009 6:56:21 am

Thank you Gaetano.
I've followed your indications and it works perfectly.

Thank again,

Victor

eZ debug

Timing: Jan 18 2025 11:42:20
Script start
Timing: Jan 18 2025 11:42:20
Module start 'content'
Timing: Jan 18 2025 11:42:21
Module end 'content'
Timing: Jan 18 2025 11:42:21
Script end

Main resources:

Total runtime1.0025 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.9531180.8125
Module start 'content' 0.00730.7790 768.7656623.1328
Module end 'content' 0.78630.2161 1,391.8984337.0234
Script end 1.0024  1,728.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.4240210.0002
Check MTime0.00160.1599210.0001
Mysql Total
Database connection0.00080.076410.0008
Mysqli_queries0.904490.21212050.0044
Looping result0.00290.28782030.0000
Template Total0.969796.720.4849
Template load0.00230.225420.0011
Template processing0.967496.499620.4837
Template load and register function0.00010.014210.0001
states
state_id_array0.00140.135210.0014
state_identifier_array0.00220.218320.0011
Override
Cache load0.00190.1904400.0000
Sytem overhead
Fetch class attribute can translate value0.00210.208340.0005
Fetch class attribute name0.00120.124190.0001
XML
Image XML parsing0.00170.167340.0004
class_abstraction
Instantiating content class attribute0.00000.0028120.0000
General
dbfile0.00460.4626390.0001
String conversion0.00000.000630.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs