Re: behavior of newlines following template tags
| From: | Monte Ohrt | Date: | Fri, 09 Feb 2001 14:37:19 +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-103@lists.php.net to get a copy of this message | ||
The {nocr} tag wouldn't be too technically feasible. It would be much
easier having a {cr} tag instead. If that's the case, we add {cr} or
{nl} and be done with it :-)
Joris Trooster wrote:
>
> 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
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/