This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » General » LOTS of whitespace
expandshrink

LOTS of whitespace

LOTS of whitespace

Tuesday 04 November 2003 6:15:02 pm - 3 replies

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.

Tuesday 04 November 2003 7:27:19 pm

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

Wednesday 05 November 2003 9: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...ation/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

Wednesday 05 November 2003 3:19:25 pm

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!

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from