Path

ez.no / ezpublish / documentation / customization / custom design / user specified parameters


User specified parameters

These documentation pages are no longer maintained. Please visit the new documentation site.

Available in 3.4 and higher

User specified parameters offer a simple way to pass values in the URL to template variables. This feature is enabled by default.

To disable this feature override ControllSettings -> AllowUserVariables in template.ini :

[ControlSettings]

AllowUserVariables=false

Syntax

User specified parameters are specified at end of url, and are supported when using url alias, nice urls, etc. Syntax :

http://host/path/(param_1)/value_1/(param_2)/value_1

The parameters param_1 and param_2 are now available in the templates in the variables : $view_parameters.param_1 and $view_parameters.param_2.

Usage

A regular URL might looks something like this :

http://ez.no/community/bug_reports

Sending a user specified parameter called filter with value new requires this URL :

http://ez.no/community/bug_reports/(filter)/new

The parameter filter can now be used in the templates. Ex:

{let bug_list=fetch( 'content',

                    'list',

                    hash( 'parent_node_id', 400,

                          'attribute_filter', array( array( 'bug/status', 

                                                            '=', 

                                                            $view_parameters.filter ) ) ) )}

The user parameters are used in the cache keys, so unique user parameters will produce unique cache instances.

Comments

Example with "HTTP Post to URL conversion"

Contents

Customization

Access control
eZ publish API Documentation
Content structure
Custom design
    User specified parameters
    Template variables set by ezPublish
    Introduction
    Variables, arrays and objects
    Node
    Database connectivity
    Sections
    File placement
    Override templates
    node_view_gui
    Pagination
    Caching
    Stylesheets
    Pagelayout
    Printable pages
    Examples
Components
Tips & Tricks
Troubleshooting


Created

13/05/2004
1:57:44 pm
by Kåre Køhler Høvik

Last updated

02/06/2004
10:45:28 am
by Terje Gunrell-Kaste

Authors

Kåre Køhler Høvik
Terje Gunrell-Kaste



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.