eval & assign
| From: | Andreas Heintze | Date: | Sun, 24 Mar 2002 12:29:43 +0000 |
| Subject: | eval & assign | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3315@lists.php.net to get a copy of this message | ||
I have now solved this by converting all '{' and '}' to '<ld<'
and
'>rd>' inside the var attribute string of eval and then making a
customized eval function I call eval_icms that converts them back to '{'
and '}' and calls _compile_template(). It works but I would rather see
smarty to be able to have these chars '{' and '}' inside attribute
strings like this:
{eval var='We found {record_count|numbertext:"no records":"one
record":"%d records"}'}
Is it hard to change smarty to accept this?
/Andreas
-----Ursprungligt meddelande-----
Från: Andreas Heintze [mailto:andreas.heintze@home.se]
Skickat: den 24 mars 2002 01:22
Till: smarty@lists.ispi.net
Ämne: [smarty] SV: eval & assign
I see... I can't have the chars { and } inside an attribute string, is
there
a way round this?
-----Ursprungligt meddelande-----
Från: Andreas Heintze [mailto:andreas.heintze@home.se]
Skickat: den 23 mars 2002 17:22
Till: smarty@lists.ispi.net
Ämne: [smarty] eval & assign
Why can't I do like this:
{assign var="records_found" value="12"}{eval assign="test" var="I
found
{$records_found|numbertext:'no records':'one record':'%d
records'}"}{test|capitalize}
/Andreas
-----Ursprungligt meddelande-----
Från: Jimmy Harlindong [mailto:jimmy@harlindong.com]
Skickat: den 23 mars 2002 16:37
Till: smarty@lists.ispi.net
Ämne: [smarty] Re: Logo
hehehe I see mine there too :) :)
> -----Original Message-----
> From: Luc Saint-Elie [mailto:luc@saint-elie.com]
> Sent: Saturday, 23 March 2002 8:41 PM
> To: smarty@lists.ispi.net
> Subject: [smarty] Re: Logo
>
>
> Hello,
>
> I added some Smarty logos here (thanks to Andreas) :
>
http://www.interpasnet.com/smarty_logo/
Authors are welcome to give me their names...
Luc
---
You are currently subscribed to smarty as: jimmy@harlindong.com
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
---
You are currently subscribed to smarty as: andreas.heintze@home.se
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
---
You are currently subscribed to smarty as: andreas.heintze@home.se
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
---
You are currently subscribed to smarty as: andreas.heintze@home.se
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/