LOTS of whitespace

Author Message

David Syers

Tuesday 04 November 2003 9:15:02 am

Hi

Maybe I have missed something really simple but whenever ez produces a page output it also leaves lots and lots and lots (you get the idea!) of white space in the document.

Now looking at the ez site there isn't really any. How can I stop all this whitespace from appearing without making all of my templates one liners and completely unreadable by humans.

Alex Jones

Tuesday 04 November 2003 10:27:19 am

I don't think we have the ability to have both right now. There has been discussion of a whitespace wash operator that would allow us to control the whitespace output by the templates, but as far as I am aware, we have to sacrifice readability of the templates, or layout of our templates.

Really annoying.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Wednesday 05 November 2003 12:57:16 am

This has annoyed me for a long time too.

This doco has coding standards for templates:

http://ez.no/developer/ez_publish_3/documentation/development/standards/template

and i notice that some areas shouldn't be indented. Though, i often place tabs where i want to make the code readable. I wonder if indentations in places is what makes the code messy.

paul

David Syers

Wednesday 05 November 2003 6:19:25 am

Thanks for your help guys.

Well it looks like I am going to have to keep 2 versions (1 editing, 1 published).

Still have to be careful mind you as if I have 2 comments on different lines one after the other

eg.

{* comment 1 *}
{* comment 2 *}

then ez keeps the line break, but if I put them on one line it's OK.

and if I have a comment after a tag

eg.

{/let} {* end let foo=bar*}

then it keeps the space inbetween and the line break.

Also don't think much of their rules as they cause white space.

Come on eZ! surely stripping out/preventing whitespace should be one of the highest priorities when building a templating engine!

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

Main resources:

Total runtime0.6571 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.7891152.6094
Module start 'layout' 0.00530.0029 740.398439.4141
Module start 'content' 0.00820.6473 779.8125572.6328
Module end 'content' 0.65550.0016 1,352.445312.1875
Script end 0.6571  1,364.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4846160.0002
Check MTime0.00140.2166160.0001
Mysql Total
Database connection0.00070.111510.0007
Mysqli_queries0.602291.6318620.0097
Looping result0.00060.0886600.0000
Template Total0.626595.320.3132
Template load0.00220.341320.0011
Template processing0.624294.990020.3121
Template load and register function0.00040.065010.0004
states
state_id_array0.00080.119110.0008
state_identifier_array0.00080.117220.0004
Override
Cache load0.00190.2958310.0001
Sytem overhead
Fetch class attribute can translate value0.00070.103230.0002
Fetch class attribute name0.00110.171850.0002
XML
Image XML parsing0.00080.117030.0003
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00070.1098160.0000
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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs