Include a JavaScript

Author Message

Mark Mollerus

Wednesday 14 September 2005 11:20:02 pm

How i can include a JavaScript into an article?

If i try to use the literal-tag, i see the source, not the script self.

I have added the script-tag over the admin-interface into content.ini and cleared cache.

i see the setting in the admin-interface for the content.ini:
siteaccess [10] script
but it dosnt work. The systems says:
unsupported tag(script)

Kristof Coomans

Wednesday 14 September 2005 11:35:48 pm

Put this in your template:

<script type="text/javascript">
<!--
{literal}
...
{/literal}
-->
</script>

Replace ... with your JavaScript. Does it work?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Ɓukasz Serwatka

Wednesday 14 September 2005 11:45:57 pm

Or ...

<script language="JavaScript" type="text/JavaScript" src="path_to_your_script/script.js"></script>

And make sure that re-write rule (if setup) exclude script file.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 04:41:36
Script start
Timing: Jan 19 2025 04:41:36
Module start 'layout'
Timing: Jan 19 2025 04:41:36
Module start 'content'
Timing: Jan 19 2025 04:41:37
Module end 'content'
Timing: Jan 19 2025 04:41:37
Script end

Main resources:

Total runtime0.7350 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.1484152.6250
Module start 'layout' 0.00460.0026 741.773439.4453
Module start 'content' 0.00720.7264 781.2188578.8984
Module end 'content' 0.73370.0013 1,360.117212.1719
Script end 0.7350  1,372.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4203160.0002
Check MTime0.00140.1910160.0001
Mysql Total
Database connection0.00070.088710.0007
Mysqli_queries0.685793.2874590.0116
Looping result0.00060.0864570.0000
Template Total0.703695.720.3518
Template load0.00200.266420.0010
Template processing0.701695.453520.3508
Template load and register function0.00010.019110.0001
states
state_id_array0.00090.126810.0009
state_identifier_array0.00110.149020.0005
Override
Cache load0.00160.2173200.0001
Sytem overhead
Fetch class attribute can translate value0.00080.112630.0003
Fetch class attribute name0.00130.181150.0003
XML
Image XML parsing0.00130.178630.0004
class_abstraction
Instantiating content class attribute0.00000.001950.0000
General
dbfile0.00090.1260240.0000
String conversion0.00000.000840.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs