ez publish script inside javascript

Author Message

wendy br

Wednesday 12 November 2003 3:00:03 am

is it possible to put ez publish script inside javascript? and can someone tell me how to do that?

grtz ushi

Paul Forsyth

Wednesday 12 November 2003 3:10:08 am

Use lots of {literal} statements!

Remember to view the source to make sure the " and ' characters are set properly. Heres an example:

{literal}
<script language="JavaScript1.2" type="text/javascript">
<!--
var var1={/literal}"{$my_va1}"{literal};
var var2={/literal}"{$my_var2}"{literal};
var var3=new Array();
{/literal}{section name=MyArray loop=$my_array}{literal}
var3[{/literal}{$MyArray:index}{literal}]={/literal}"{$MyArray:item}"{literal};
{/literal}{/section}{literal}
//-->
</script>

paul

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 16:16:21
Script start
Timing: Jan 18 2025 16:16:21
Module start 'layout'
Timing: Jan 18 2025 16:16:21
Module start 'content'
Timing: Jan 18 2025 16:16:22
Module end 'content'
Timing: Jan 18 2025 16:16:22
Script end

Main resources:

Total runtime0.5810 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.0063 589.0469152.6250
Module start 'layout' 0.00640.0025 741.671939.4609
Module start 'content' 0.00880.5709 781.1328458.0156
Module end 'content' 0.57980.0012 1,239.14848.1563
Script end 0.5809  1,247.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5684160.0002
Check MTime0.00130.2241160.0001
Mysql Total
Database connection0.00100.167810.0010
Mysqli_queries0.542193.3077540.0100
Looping result0.00040.0769520.0000
Template Total0.554595.420.2772
Template load0.00200.351220.0010
Template processing0.552495.086920.2762
Template load and register function0.00010.019110.0001
states
state_id_array0.00070.126210.0007
state_identifier_array0.00070.123820.0004
Override
Cache load0.00170.2938200.0001
Sytem overhead
Fetch class attribute can translate value0.00050.091420.0003
Fetch class attribute name0.00170.284020.0008
XML
Image XML parsing0.00030.045320.0001
class_abstraction
Instantiating content class attribute0.00000.001020.0000
General
dbfile0.00060.1025100.0001
String conversion0.00000.001240.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
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: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs