ezscript loadorder and template question

Author Message

Lars Eirik R

Tuesday 01 March 2011 4:27:59 am

Hi.

We have experienced that ezscript_require(array(file,file,file) is not work if it appears before the following statement in our override template

{set scope=global persistent_variable=hash('left_menu', false(),
'extra_menu', false(),
'show_path', false())}

If i move the ezscript_require below the persisten_variable setting it works fine..

Is this a bug or something i should understand?

Also how can we influence the order of which the javascripts are loaded? We currently need to disable the packer feature to have our dependent libraries work successfully? Any thing i can do to control the order of these included javascripts when adding into the ezscript_require ordering?

André R.

Tuesday 01 March 2011 5:25:33 am

persistent_variable is used internally in ezscript* ezcss* functions to be able to persist variables from node view if page is cached.

The line you refer to clears the whole value. You can use ezpagedata_set( string $key, mixed $value ) / ezpagedata_append( string $key, mixed $value ) as provided by ezwebin instead, they will not overwrite the whole variable but instead threat it as a hash.

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

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 18 2025 02:09:37
Script start
Timing: Jan 18 2025 02:09:37
Module start 'layout'
Timing: Jan 18 2025 02:09:37
Module start 'content'
Timing: Jan 18 2025 02:09:38
Module end 'content'
Timing: Jan 18 2025 02:09:38
Script end

Main resources:

Total runtime0.8038 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.1797152.6406
Module start 'layout' 0.00530.0029 741.820339.4844
Module start 'content' 0.00820.7943 781.3047532.1406
Module end 'content' 0.80250.0013 1,313.44538.1250
Script end 0.8038  1,321.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3802160.0002
Check MTime0.00120.1516160.0001
Mysql Total
Database connection0.00070.088710.0007
Mysqli_queries0.760494.6015540.0141
Looping result0.00050.0592520.0000
Template Total0.772096.020.3860
Template load0.00220.269820.0011
Template processing0.769995.776220.3849
Template load and register function0.00010.015210.0001
states
state_id_array0.00080.104410.0008
state_identifier_array0.00110.131620.0005
Override
Cache load0.00180.2208160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.079320.0003
Fetch class attribute name0.00100.124940.0003
XML
Image XML parsing0.00080.100820.0004
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00340.4224230.0001
String conversion0.00000.000740.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs