LOTS of whitespace

LOTS of whitespace

Tuesday 04 November 2003 9:15:02 am - 3 replies

Author Message

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!

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.