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

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 18 2025 11:06:16
Script start
Timing: Jan 18 2025 11:06:16
Module start 'layout'
Timing: Jan 18 2025 11:06:16
Module start 'content'
Timing: Jan 18 2025 11:06:16
Module end 'content'
Timing: Jan 18 2025 11:06:16
Script end

Main resources:

Total runtime0.0142 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.0050 588.1563152.6563
Module start 'layout' 0.00500.0027 740.812539.5078
Module start 'content' 0.00770.0041 780.320393.5234
Module end 'content' 0.01180.0024 873.843838.3047
Script end 0.0142  912.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002618.0798140.0002
Check MTime0.00128.6953140.0001
Mysql Total
Database connection0.00075.079710.0007
Mysqli_queries0.002114.603430.0007
Looping result0.00000.083910.0000
Template Total0.002013.810.0020
Template load0.00096.359210.0009
Template processing0.00107.365410.0010
Override
Cache load0.00064.375310.0006
General
dbfile0.00021.574780.0000
String conversion0.00000.062040.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