ez projects / owviewparams


UNIX name Owner Status Version Compatible with
owviewparams Simon Boyer stable 1.3 4.x
owViewParameters is a template operator which help you to manage url and view_parameters.

owViewParams template operator generates a new url with all view_parameters you want to preserve, modify, and remove.

Example :

You have this url :

And you want modify the param1 value, remove param2 and add a new parameter, you can use owViewParams operator :

<a href="{''|createUrl( $view_parameters,
                    hash('modify', hash('param1', 'newValue1',
                                           'param3', 'value3'),
                          'exclude', array( 'param2')
                      ) )}">Test</a>

This will return :

Parameters :

'modify' : used to modify view_parameters values. If a view_parameter doesn't exists, it will be created.
'only' : used to keep only specified view_parameters (added to 'modify' view_parameters)
'exclude' : used to remove specified view_parameters (except 'modify' view_parameters)
Hope you find it useful!
Simon Boyer

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.