Re: [SMARTY] Need help with modifiers

From: Date: Thu, 17 Apr 2003 15:54:23 +0000
Subject: Re: [SMARTY] Need help with modifiers
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9298@lists.php.net to get a copy of this message
Very Cool ! It worked... thank you "Messju Mohr" <messju@lammfellpuschen.de> schrieb im Newsbeitrag news:20030417153415.GI17637@pharao.lammfellpuschen.de... > On Thu, Apr 17, 2003 at 04:51:40PM +0200, Alexander Feil wrote: > > Hi There! > > > > I'm trying to get this expression work: > > > > {$nachricht|replace:"#name":$sms[sms].name|replace:"#datum":$event.datum|dat > > e_format:'%d.%m.%Y'|replace:"#ort":$event.ort} > > > > especially this doesn't work: > > |replace:"#datum":$event.datum|date_format:'%d.%m.%Y' > > i think the problem is: you cannot have brackets in modifiers so you > cannot force operator-precedence in chained modifiers. they are always > applied from lefto to right. > > you want to do modify $event.datum with |date_format, but you > modify $nachricht with it. > > try sth. like: > > {assign var=tmp_datum value=$event.datum|date_format:'%d.%m.%Y'} > {$nachricht|replace:"#name":$sms[sms].name|replace:"#datum":$tmp_datum|repla ce:"#ort":$event.ort} > > HTH > > > Can anybody help?? > > > > Greets from Germany, > > me2 :) > > > Alexander Feil

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