ezpagedata_set( key, value )
Name | Type | Description | Required |
---|---|---|---|
key | string | The key for your new persistent variable. | Yes. |
value | mixed | The value to add into your new persistent variable. | Yes. |
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.
{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 |