ezpagedata( params )
Name | Type | Description | Required |
---|---|---|---|
params | hash | Attributes to override. | No. |
This operator extracts information from the page data, and make it available both for content templates and module templates.
The ezpagedata operator has been introduced by eZ Website Interface and it requires the ezwebin extension to be installed.
It allows to override several attributes by specifying them in the params parameter in the form of an hash.
Possible attributes to override are the following:
Attribute | Type | Default value |
---|---|---|
current_node_id |
integer |
current node id |
template_look (deprecated) |
boolean |
false |
canonical_url |
boolean |
false |
show_path |
boolean | string |
path |
website_toolbar |
boolean |
false |
top_menu |
boolean | string |
from menu.ini[SelectedMenu]TopMenu |
left_menu |
boolean | string |
from menu.ini[SelectedMenu]LeftMenu |
extra_menu |
boolean | string |
extra_info |
extra_menu_node_id |
integer | array |
current node id |
extra_menu_class_list |
boolean | array |
infobox |
extra_menu_subitems |
integer |
0 |
{def $pageData = ezpagedata()} {$pageData|attribute(show)}
If the requested URL is "/content/view/full/106" (or using URL alias that points to "/content/view/full/106"), the following output will be produced:
Attribute | Type | Value |
---|---|---|
persistent_variable |
array |
Array(1) |
>js_files |
array |
Array(6) |
main_node_id |
string |
106 |
show_path |
string |
'path' |
website_toolbar |
boolean |
true |
node_id |
integer |
106 |
is_edit |
boolean |
false |
page_root_depth |
integer |
0 |
page_depth |
integer |
2 |
root_node |
string |
2 |
canonical_url |
boolean |
false |
canonical_language_url |
boolean |
false |
template_look |
object[eZContentObject] |
Object |
>id |
string |
54 |
>section_id |
string |
5 |
>owner_id |
string |
14 |
>contentclass_id |
string |
15 |
>name |
string |
'Website Interface LS' |
>published |
string |
1082016652 |
>modified |
string |
1301062376 |
>current_version |
string |
2 |
>status |
string |
1 |
>remote_id |
string |
'8b8b22fe3c6061ed500fbd2b377b885f' |
>language_mask |
string |
2 |
>initial_language_id |
string |
2 |
>current |
object[eZContentObjectVersion] |
Object |
>versions |
array |
Array(3) |
>author_array |
array |
Array(1) |
>class_name |
string |
'Template look' |
>content_class |
object[eZContentClass] |
Object |
>contentobject_attributes |
array |
Array(18) |
>owner |
object[eZContentObject] |
Object |
>related_contentobject_array |
array |
Array(0) |
>related_contentobject_count |
string |
0 |
>reverse_related_contentobject_array |
array |
Array(0) |
>reverse_related_contentobject_count |
string |
0 |
>linked_contentobject_array |
array |
Array(0) |
>linked_contentobject_count |
string |
0 |
>reverse_linked_contentobject_array |
array |
Array(0) |
>reverse_linked_contentobject_count |
string |
0 |
>embedded_contentobject_array |
array |
Array(0) |
>embedded_contentobject_count |
string |
0 |
>reverse_embedded_contentobject_array |
array |
Array(0) |
>reverse_embedded_contentobject_count |
string |
0 |
>can_read |
boolean |
true |
>can_pdf |
boolean |
true |
>can_diff |
boolean |
true |
>can_create |
boolean |
true |
>can_create_class_list |
array |
Array(35) |
>can_edit |
boolean |
true |
>can_translate |
boolean |
true |
>can_remove |
boolean |
true |
>can_move |
boolean |
true |
>can_move_from |
boolean |
true |
>can_view_embed |
boolean |
true |
>data_map |
array |
Array(18) |
>grouped_data_map |
array |
Array(1) |
>main_parent_node_id |
string |
58 |
>assigned_nodes |
array |
Array(1) |
>parent_nodes |
array |
Array(1) |
>main_node_id |
string |
56 |
>main_node |
object[eZContentObjectTreeNode] |
Object |
>default_language |
string |
'eng-GB' |
>content_action_list |
boolean |
false |
>class_identifier |
string |
'template_look' |
>class_group_id_list |
array |
Array(1) |
>match_ingroup_id_list |
boolean |
false |
>current_language |
string |
'eng-GB' |
>current_language_object |
object[eZContentLanguage] |
Object |
>initial_language |
object[eZContentLanguage] |
Object |
>initial_language_code |
string |
'eng-GB' |
>available_languages |
array |
Array(1) |
>language_codes |
array |
Array(1) |
>language_js_array |
string |
'[{"locale":"eng-GB","name":"English (United Kingdom)"}]' |
>languages |
array |
Array(1) |
>all_languages |
array |
Array(1) |
>can_edit_languages |
array |
Array(1) |
>can_create_languages |
array |
Array(1) |
>always_available |
integer |
0 |
>allowed_assign_section_list |
array |
Array(6) |
>allowed_assign_state_id_list |
array |
Array(0) |
>allowed_assign_state_list |
array |
Array(0) |
>state_id_array |
array |
Array(1) |
>state_identifier_array |
array |
Array(1) |
class_identifier |
string |
'folder' |
top_menu |
string |
'flat_top' |
left_menu |
string |
'' |
current_menu |
string |
'TopOnly' |
extra_menu |
boolean |
false |
extra_menu_node_id |
integer |
106 |
extra_menu_subitems |
string |
0 |
extra_menu_class_list |
array |
Array(1) |
>0 |
string |
'infobox' |
path_array |
array |
Array(2) |
>0 |
array |
Array(4) |
>1 |
array |
Array(4) |
path_id_array |
array |
Array(2) |
>0 |
string |
2 |
>1 |
string |
106 |
path_normalized |
string |
' subtree_level_0_node_id_2 subtree_level_1_node_id_106' |
css_classes |
string |
'nosidemenu noextrainfo section_id_1 subtree_level_0_node_id_2 subtree_level_1_node_id_106' |
{def $pageData = ezpagedata(hash('current_node_id',108,'show_path','/my/custom/path','website_toolbar',false(),'left_menu','my_left_menu','top_menu','my_top_menu'))} {$pageData|attribute(show)}
When requesting the URL "/content/view/full/106" (like on example 1) we can see that the override to the attributes 'current_node_id', 'show_path', 'top_menu' and 'left_menu' have been performed successful, as you can see in the following output:
Attribute | Type | Value |
---|---|---|
persistent_variable |
array |
Array(1) |
>js_files |
array |
Array(6) |
main_node_id |
string |
106 |
show_path |
string |
'/my/custom/path' |
website_toolbar |
boolean |
false |
node_id |
integer |
108 |
is_edit |
boolean |
false |
page_root_depth |
integer |
0 |
page_depth |
integer |
2 |
root_node |
string |
2 |
canonical_url |
boolean |
false |
canonical_language_url |
boolean |
false |
template_look |
object[eZContentObject] |
Object |
>id |
string |
54 |
>section_id |
string |
5 |
>owner_id |
string |
14 |
>contentclass_id |
string |
15 |
>name |
string |
'Website Interface LS' |
>published |
string |
1082016652 |
>modified |
string |
1301062376 |
>current_version |
string |
2 |
>status |
string |
1 |
>remote_id |
string |
'8b8b22fe3c6061ed500fbd2b377b885f' |
>language_mask |
string |
2 |
>initial_language_id |
string |
2 |
>current |
object[eZContentObjectVersion] |
Object |
>versions |
array |
Array(3) |
>author_array |
array |
Array(1) |
>class_name |
string |
'Template look' |
>content_class |
object[eZContentClass] |
Object |
>contentobject_attributes |
array |
Array(18) |
>owner |
object[eZContentObject] |
Object |
>related_contentobject_array |
array |
Array(0) |
>related_contentobject_count |
string |
0 |
>reverse_related_contentobject_array |
array |
Array(0) |
>reverse_related_contentobject_count |
string |
0 |
>linked_contentobject_array |
array |
Array(0) |
>linked_contentobject_count |
string |
0 |
>reverse_linked_contentobject_array |
array |
Array(0) |
>reverse_linked_contentobject_count |
string |
0 |
>embedded_contentobject_array |
array |
Array(0) |
>embedded_contentobject_count |
string |
0 |
>reverse_embedded_contentobject_array |
array |
Array(0) |
>reverse_embedded_contentobject_count |
string |
0 |
>can_read |
boolean |
true |
>can_pdf |
boolean |
true |
>can_diff |
boolean |
true |
>can_create |
boolean |
true |
>can_create_class_list |
array |
Array(35) |
>can_edit |
boolean |
true |
>can_translate |
boolean |
true |
>can_remove |
boolean |
true |
>can_move |
boolean |
true |
>can_move_from |
boolean |
true |
>can_view_embed |
boolean |
true |
>data_map |
array |
Array(18) |
>grouped_data_map |
array |
Array(1) |
>main_parent_node_id |
string |
58 |
>assigned_nodes |
array |
Array(1) |
>parent_nodes |
array |
Array(1) |
>main_node_id |
string |
56 |
>main_node |
object[eZContentObjectTreeNode] |
Object |
>default_language |
string |
'eng-GB' |
>content_action_list |
boolean |
false |
>class_identifier |
string |
'template_look' |
>class_group_id_list |
array |
Array(1) |
>match_ingroup_id_list |
boolean |
false |
>current_language |
string |
'eng-GB' |
>current_language_object |
object[eZContentLanguage] |
Object |
>initial_language |
object[eZContentLanguage] |
Object |
>initial_language_code |
string |
'eng-GB' |
>available_languages |
array |
Array(1) |
>language_codes |
array |
Array(1) |
>language_js_array |
string |
'[{"locale":"eng-GB","name":"English (United Kingdom)"}]' |
>languages |
array |
Array(1) |
>all_languages |
array |
Array(1) |
>can_edit_languages |
array |
Array(1) |
>can_create_languages |
array |
Array(1) |
>always_available |
integer |
0 |
>allowed_assign_section_list |
array |
Array(6) |
>allowed_assign_state_id_list |
array |
Array(0) |
>allowed_assign_state_list |
array |
Array(0) |
>state_id_array |
array |
Array(1) |
>state_identifier_array |
array |
Array(1) |
class_identifier |
string |
'folder' |
top_menu |
string |
'my_top_menu' |
left_menu |
string |
'my_left_menu' |
current_menu |
string |
'TopOnly' |
extra_menu |
boolean |
false |
extra_menu_node_id |
integer |
108 |
extra_menu_subitems |
string |
0 |
extra_menu_class_list |
array |
Array(1) |
>0 |
string |
'infobox' |
path_array |
array |
Array(2) |
>0 |
array |
Array(4) |
>1 |
array |
Array(4) |
path_id_array |
array |
Array(2) |
>0 |
string |
2 |
>1 |
string |
106 |
path_normalized |
string |
' subtree_level_0_node_id_2 subtree_level_1_node_id_106' |
css_classes |
string |
'sidemenu noextrainfo section_id_1 subtree_level_0_node_id_2 subtree_level_1_node_id_106' |