no-whitespace template operator

no-whitespace template operator

Sunday 07 September 2003 2:34:32 pm - 3 replies

Author Message

Jan Borsodi

Monday 08 September 2003 2:42:36 am

Good idea, this makes it easier to write templates for readability and structure while still getting proper HTML output without extra spaces.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Daniel Staver

Wednesday 10 September 2003 3:32:32 am

I't would also be good if the operator preserved whitespace between text inside tags:

This:

{no-whitespace}
<ul>
<li>This is a text</li>
<li>This another text</li>
</ul>
{/no-whitespace}

Should produce this:

<ul><li>This is a text</li><li>This another text</li></ul>

Not this:

<ul><li>Thisisatext</li><li>Thisanothertext</li></ul>

This is one of the specific cases where I would use the no-whitespace operator. With standard compliant CSS it's possible to format lists to look like rows or columns of buttons, while they will show up as regular lists in older browsers. For this to work it's vital to remove every whitespace between the </li><li> tags, otherwise you get unwanted spacing between the buttons.

Daniel Staver
http://daniel.staver.no

Paul Forsyth

Wednesday 10 September 2003 3:41:15 am

This would be very helpful with browser compatibility. Many of the problems I come across when trying to shape up a site in IE and Mozilla are whitespace-related.

As well as white space could a similar operator help with tabs? I use a lot of tabs when editing to format my files but when it is processed into html the source can be very ugly. Lots of whitespace, new lines and tabs cluttering up the view.

Paul

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.