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