does {literal} work?

Author Message

Erik Petersen

Tuesday 07 January 2003 9:33:38 pm

I'm having javascript issues:

{literal}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
header_08_over = newImage(header_08_over_name);
header_09_over = newImage(header_09_over_name);
header_10_over = newImage(header_10_over_name);
header_11_over = newImage(header_11_over_name);
header_12_over = newImage(header_12_over_name);
header_13_over = newImage(header_13_over_name);
header_14_over = newImage(header_14_over_name);
header_15_over = newImage(header_15_over_name);
menubox_01 = newImage(menubox_01_name);
menubox_02 = newImage(menubox_02_name);
menubox_04 = newImage(menubox_04_name);
preloadFlag = true;
}
}
{/literal}
// -->

produces:

var preloadFlag = false;
function preloadImages()
if (document.images) {
header_08_over = newImage(header_08_over_name);
header_09_over = newImage(header_09_over_name);
header_10_over = newImage(header_10_over_name);
header_11_over = newImage(header_11_over_name);
header_12_over = newImage(header_12_over_name);
header_13_over = newImage(header_13_over_name);
header_14_over = newImage(header_14_over_name);
header_15_over = newImage(header_15_over_name);
menubox_01 = newImage(menubox_01_name);
menubox_02 = newImage(menubox_02_name);
menubox_04 = newImage(menubox_04_name);
preloadFlag = true;

}

// -->

Not the missing braces after the function name and at the end. What's up with that?

Jan Borsodi

Wednesday 08 January 2003 2:58:11 am

> I'm having javascript issues:
>
> [..]
> Not the missing braces after the function name and at the
> end. What's up with that?

The literal tag does not work in RC1 due to a bug, it has been fixed and will be present in the next release.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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 30 2025 19:40:50
Script start
Timing: Jan 30 2025 19:40:50
Module start 'layout'
Timing: Jan 30 2025 19:40:50
Module start 'content'
Timing: Jan 30 2025 19:40:51
Module end 'content'
Timing: Jan 30 2025 19:40:51
Script end

Main resources:

Total runtime1.2325 sec
Peak memory usage8,192.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1328151.2109
Module start 'layout' 0.00480.0055 739.3438220.6875
Module start 'content' 0.01031.2215 960.03134,437.2266
Module end 'content' 1.23170.0007 5,397.257811.8594
Script end 1.2324  5,409.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3009160.0002
Check MTime0.00140.1129160.0001
Mysql Total
Database connection0.00060.047410.0006
Mysqli_queries1.144792.8796540.0212
Looping result0.00060.0480520.0000
Template Total1.180795.820.5904
Template load0.00200.163820.0010
Template processing1.178795.636320.5893
Template load and register function0.00160.129710.0016
states
state_id_array0.00180.149110.0018
state_identifier_array0.00200.162120.0010
Override
Cache load0.00180.1493520.0000
Sytem overhead
Fetch class attribute can translate value0.00180.149920.0009
Fetch class attribute name0.00200.164530.0007
XML
Image XML parsing0.00070.059520.0004
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00090.0753170.0001
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
2content/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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs