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.