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

[email protected] (messju mohr)
Newsgroups php.smarty.dev
Message-ID <[email protected]>
On Sat, Nov 27, 2004 at 09:21:46PM +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}

that's what {strip} is for. see:
http://smarty.php.net/manual/en/language.function.strip.php
 
> 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
> 
> -- 
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
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.