Javascript in tpl file

Author Message

DeAndre Johnson

Tuesday 16 December 2008 9:45:16 am

Is there a way to add javascript in tpl file without breaking site?

I am, because I choose to be!

Damien Pobel

Tuesday 16 December 2008 10:12:16 am

Hi,

yes ! you should have a look to the literal template function.

[1] http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions/miscellaneous/literal

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

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 31 2025 01:14:35
Script start
Timing: Jan 31 2025 01:14:35
Module start 'layout'
Timing: Jan 31 2025 01:14:35
Module start 'content'
Timing: Jan 31 2025 01:14:35
Module end 'content'
Timing: Jan 31 2025 01:14:35
Script end

Main resources:

Total runtime0.0237 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.1250151.2109
Module start 'layout' 0.00530.0035 739.3359220.6719
Module start 'content' 0.00880.0131 960.0078997.6641
Module end 'content' 0.02190.0017 1,957.671929.9922
Script end 0.0236  1,987.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002510.5575140.0002
Check MTime0.00104.4143140.0001
Mysql Total
Database connection0.00073.062010.0007
Mysqli_queries0.00239.634230.0008
Looping result0.00000.037310.0000
Template Total0.00135.510.0013
Template load0.00104.075010.0010
Template processing0.00031.447910.0003
Override
Cache load0.00072.804310.0007
General
dbfile0.00249.954480.0003
String conversion0.00000.034240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs