Re: behavior of newlines following template tags

From: Date: Fri, 09 Feb 2001 07:53:25 +0000
Subject: Re: behavior of newlines following template tags
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-98@lists.php.net to get a copy of this message
Yes, that's a good question.. Let's look at this backwards (from template output to template code): The first line E-mail: name@domain.com The next line The first line Your e-mail address isn't given. The next line I should write a code like this, and expect the above output: The first line {if $email} E-mail: {$email} {else} Your e-mail address isn't given. {/if} The next line But what if we want to have some code that gives an output like this: The first line E-mail: name@domain.com The next line The first line E-mail: Your e-mail address isn't given. The next line I would (expect to) do something like this: The first line E-mail: {if $email}{$email} {else}Your e-mail address isn't given. {/if} The next line But that's not always practical, so maybe we can add a tag like {nocr} The first line E-mail: {nocr} {if $email} {$email} {else} Your e-mail address isn't given. {/if} The next line In the examples the text between the {else}and{/if} should be appear on the same position as the text between {if}and{else}. Comments? Joris

« previous php.smarty.general (#98) next »