This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » $view_parameters



Wednesday 15 February 2012 10:14:10 am - 7 replies

HiI work in a project where I use the variable $view_parameters a popin sent to retrieve values ​​using the  "layout/set/Test/',$node.url_alias,'/(node)/',$node.node_id)"
In the first time I can retrieve these values ​​via $view_parameter.node, by cons if I try a second time I can not retrieve these values
Thank you in advance 

Wednesday 15 February 2012 5:42:25 pm


I'm not quite sure if I get you right, but it might be a caching problem. To find out, put the following line at top of your full view template

 {set-block scope=global variable=cache_ttl}0{/set-block}

This will prevent the template from being cached and you might be able to access the value.

Hope this helps.


Modified on Wednesday 15 February 2012 5:42:55 pm by Donat Fritschy

Wednesday 15 February 2012 6:31:58 pm


thank you for your answer.

But I already used to flush the cache, for against the problem persists
Thank you in advance

Thursday 16 February 2012 11:58:41 am



Any news in this posts ??





Friday 17 February 2012 1:48:10 am

Helllo Amine,


You should know that view_parameters are -not- supported outside the use of the content module.

So the layout module can not provide them (to my knowlege).


We've (BC) tried to start solving this problem by creating a solution via github pull request.

So far no one has commented in support of this solution.


If this is valued by you or anyone please comment on the above pull request to show your support.

Alternatively you can use _GET, _POST and _REQUEST variables instead of view parameters.


I hope this helps ...



Thursday 23 February 2012 6:58:59 pm


 Thank you for your answer,
 but during the first few times, I can retrieve the value via $view_parameter.node
So I try to always get the value in the content module, since the layout/set to load as a popin, then the action of the popin to acontent / view.




thank you

Monday 02 July 2012 6:09:54 pm

Quote from // Heath :

So far no one has commented in support of this solution.

I encountered the exact same problem and tried the solution suggested by Heath which works like a charm!

By adding this lines inside index.php problem solved..

    $viewParameters = array();
    $uriUserParameters = $uri->userParameters();
    foreach( $uriUserParameters as $key => $param )
        if( $param != '' )
            $viewParameters = array_merge( $viewParameters, array( $key => $param ) );
    $tpl->setVariable( 'view_parameters', $viewParameters );

Thanks indeed! happy.gif Emoticon

Thursday 01 August 2013 1:48:44 am

Hello Lo' F.!

Thank you for your very positive testing and feedback!

You are fantastic, you rock!

Thanks again for all your support! 

We look forward to others chiming in with their reviews of this solution. Feel free to speak up in this forum thread or elsewhere in the forums!



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from