ezpagedata_set

Summary

Sets a new persistent variable into the page data.

Usage

ezpagedata_set( key, value )

Parameters

NameTypeDescriptionRequired
key string The key for your new persistent variable. Yes.
value mixed The value to add into your new persistent variable. Yes.

Description

The ezpagedata_set() operator creates a new persistent variable into your page data.
This operator has been introduced by eZ Website Interface, and it is required that the ezwebin extension is installed to use it.

Created persistent variables can be accessed by using the ezpagedata() operator.

Examples

Example 1

{ezpagedata_set('my_new_persistent_variable', hash('my_value',918))}
 
{def $mypageData = ezpagedata()}
{$mypageData.persistent_variable|attribute(show)}

When using the attribute(show) operator to output the content of your persistent_variable it should look like the following:

Attribute

Type

Value

js_files

array

Array(6)

>0

string

'ezjsc::yui3'

>1

string

'ezjsc::yui3io'

>2

string

'ezcontentstaging_yui3.js'

>3

string

'node_tabs.js'

>4

string

'ezjsc::yui2'

>5

string

'ezajaxsubitems_datatable.js'

my_new_persistent_variable

array

Array(1)

>my_value

integer

918

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.