Re: behavior of newlines following template tags
| From: | Joris Trooster | Date: | Fri, 09 Feb 2001 08:30:48 +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-101@lists.php.net to get a copy of this message | ||
For this example that should work out, but for a general rule it is not
always practical:
| {id} | {$name} | column3 | column4 | {nocr}
{if $email}
{$email}
{else}
no email
{/if}{nocr}
| column5 | column6
or without {nocr}:
| {id} | {$name} | column3 | column4 | {if $email}{$email}
{else}
no email
{/if}| column5 | column6
In your example I should repeat "| {id} | {$name} | column3 | column4 | "...
Looking at my example the newline after a variable should be only printed if
not followed by a conditional tag. But there are probably examples against
this... Yes Monte... in interesting subject.... Maybe we can steal idea's
from other design-scripting-languages (scripting in Word, Adobe)?
Joris
> How about this ?
>
> The first line
> {if $email}E-mail : {$email}
> {else}E-mail : Your e-mail address isn't given.
> {/if}
> The next line