Question about variables scope

Author Message

Sébastien Antoniotti

Monday 24 September 2007 5:04:24 am

Hi,

I would like to define a variable into the pagelayout.tpl and use it into all my content view template file.

is there a way to to this ?

eZ Publish Freelance
web : http://www.webaxis.fr

André R.

Monday 24 September 2007 6:16:54 am

No, module views (including content/view) are generated befrore pagelayout is generated.

About scope:
http://ez.no/developer/forum/developer/what_is_variables/re_what_iare_variables__2

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Sébastien Antoniotti

Monday 24 September 2007 6:32:11 am

Ok thank you !

eZ Publish Freelance
web : http://www.webaxis.fr

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

eZ debug

Timing: Jan 19 2025 00:16:43
Script start
Timing: Jan 19 2025 00:16:43
Module start 'layout'
Timing: Jan 19 2025 00:16:43
Module start 'content'
Timing: Jan 19 2025 00:16:45
Module end 'content'
Timing: Jan 19 2025 00:16:45
Script end

Main resources:

Total runtime1.3970 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.9063152.6250
Module start 'layout' 0.00600.0027 740.531339.4453
Module start 'content' 0.00871.3867 779.9766541.5078
Module end 'content' 1.39540.0016 1,321.484412.1641
Script end 1.3969  1,333.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2413160.0002
Check MTime0.00130.0920160.0001
Mysql Total
Database connection0.00090.061810.0009
Mysqli_queries1.346996.4125570.0236
Looping result0.00050.0386550.0000
Template Total1.364497.720.6822
Template load0.00200.139920.0010
Template processing1.362497.525920.6812
Template load and register function0.00010.006710.0001
states
state_id_array0.00090.067910.0009
state_identifier_array0.00120.088820.0006
Override
Cache load0.00160.1158150.0001
Sytem overhead
Fetch class attribute can translate value0.00090.063420.0004
Fetch class attribute name0.00100.074850.0002
XML
Image XML parsing0.00100.069420.0005
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00090.0643230.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs