Re: [SMARTY-DEV] Strip whitespace between smarty tags

[email protected] (Robby Russell)
Newsgroups php.smarty.dev
Organization PLANET ARGON
Message-ID <1101587730.2431.55.camel@vacant>
On Sat, 2004-11-27 at 21:21 +0100, Rainer Müller wrote:
> Hi,
> 
> It would be great to strip out whitespace between smarty tags, so that 
> it does not end up in the output.
> Example:
> 
> {foreach name=example from=$events item=item}
> 	{if $smarty.foreach.example.first}foo{/if}
> 	...
> {/foreach}
> 
> The indentation before {if} is in the output and now the indentation in 
> html source looks very strange.
> I don't want to use unindented smarty code in my templates, because this 
> would decrease readability.
> 
> Rainer
> 

Are you using tabs or spaces for your indentation?

-Robby

-- 
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [email protected]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*    --- Now supporting PHP5 ---
****************************************/
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQBBqOUS0QaQZBaqXgwRAvXNAJ9AdrZGoflvHw1rNnBZHQykdiGzvQCfYkqZ
ISTLvyH9vh9CMfw94rpFCIM=
=dR9D
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.