Re: concatenation operator...?
| From: | Monte Ohrt | Date: | Wed, 27 Jun 2001 13:14:38 +0000 |
| Subject: | Re: concatenation operator...? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1018@lists.php.net to get a copy of this message | ||
{if $title|concat:"before" ne ""}
{if $title|concat:"after" ne ""}
This gets really nasty if you want to string several variables together.
Ivo Jansch wrote:
>
> Hi,
>
> Andrei Zmievski wrote:
>
> > operator'. Something like this might be achieved via modifiers, but that
> > means we'd have to allow applying modifiers to static strings:
> > {"Admin - "|concat:$title}
>
> Andrei, there's no need to invent static string modifiers.
> This can be achieved with the current features if you implement just one
> simple custom modifier:
>
> {$title|prepend("Admin - ")}
>
> Greetings,
> Ivo
>
> --
> Ivo Jansch <ivo@ibuildings.nl>
> ibuildings.nl BV - information technology
> http://www.ibuildings.nl
>
> ---
> 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/