HOWTO: Show only comment in HTML source when debuging templates

Author Message

Aya Brea

Saturday 29 November 2003 12:40:40 pm

Hello,

When I turn on the templatedebuging, eZp print out following HTML code:

<!-- including template design/ez/override/templates/page_head.tpl -->
<p class="small">design/ez/override/templates/page_head.tpl</p><br/>

How can I turn off that <p>something</p><br /> things? I need only the comment, when developing the template, these <p> tags is annoying...

Aya Brea

Saturday 29 November 2003 12:48:03 pm

I found out that there's no settings can do this, so I make a minor hack:

Open file:
/path/to/ezp/lib/eztemplate/classes/eztemplatefileresource.php

Goto line:
258 (eZ publish 3.2.3)

That's the line that output the template debuging. Change it to whatever you want. For those who don't know much about PHP. Change that to following:
$text = "<!-- $path -->\n" . $text;

Happy templating eZ publish :D

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

Main resources:

Total runtime1.2317 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1719152.6563
Module start 'layout' 0.00530.0034 740.828139.5234
Module start 'content' 0.00871.2215 780.3516427.7031
Module end 'content' 1.23020.0014 1,208.05478.0938
Script end 1.2317  1,216.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2677160.0002
Check MTime0.00130.1040160.0001
Mysql Total
Database connection0.00100.083410.0010
Mysqli_queries1.191696.7408520.0229
Looping result0.00040.0332500.0000
Template Total1.195897.120.5979
Template load0.00210.166920.0010
Template processing1.193796.913320.5968
Template load and register function0.00010.010510.0001
states
state_id_array0.00120.099710.0012
state_identifier_array0.00090.070920.0004
Override
Cache load0.00160.1291170.0001
Sytem overhead
Fetch class attribute can translate value0.00060.048110.0006
Fetch class attribute name0.00120.093920.0006
XML
Image XML parsing0.00010.010510.0001
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00250.2047100.0003
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
2content/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
4content/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: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs