Re: [PHPTAL] Escaping of dollar sign ($)

2009-11-04 Thread Kornel Lesiński
On 03-11-2009 at 17:56:02 Tobias Herp bruno-the-questiona...@gmx.net wrote: Kornel Lesiński wrote: I could change it to: ${x} → value $${x} → ${x} $$${x} → $value {x} → $${x} ${x} → $$value $${x} → $$${x} etc. Yes, please! This is logical, and it is the behaviour defined by

Re: [PHPTAL] Escaping of dollar sign ($)

2009-11-04 Thread Kornel Lesiński
On 04-11-2009 at 10:22:56 Tjerk Meesters tjerk.meest...@gmail.com wrote: Would it be possible to use a preg_replace() with two expressions, one to replace $$ by $ and one to handle \b${?(\w+) You'd have to use assertions or other tricks, to avoid replacing unrelated $$s. I think I'll just

Re: [PHPTAL] Escaping of dollar sign ($)

2009-11-03 Thread Tobias Herp
Kornel Lesiński wrote: I could change it to: ${x} → value $${x} → ${x} $$${x} → $value {x} → $${x} ${x} → $$value $${x} → $$${x} etc. Yes, please! This is logical, and it is the behaviour defined by the TALES standard

Re: [PHPTAL] Escaping of dollar sign ($)

2009-10-27 Thread Nick Pack
What about the html entity: #36; On 26/10/2009 23:10, Cameron Junge cameron.ju...@finda.co.nz wrote: Hi All, Not sure if this has been covered on this list before, my quick search couldn't find anything that seemed appropriate. If I wish to display a $ followed by a tal variable using

Re: [PHPTAL] Escaping of dollar sign ($)

2009-10-27 Thread Kornel Lesiński
On 26-10-2009 at 23:10:45 Cameron Junge cameron.ju...@finda.co.nz wrote: Eg. if I have a variable amount with the value 100, and I want to display is as $100 then I either have to do: a) $ ${amount}; or b) $tal:block replace=amount /; or c) tal:block replace=money: amount / $x

Re: [PHPTAL] Escaping of dollar sign ($)

2009-10-27 Thread Tjerk Meesters
I vote for not changing the current behaviour; I agree that if it's documented, it can be a little weird ;-) Personally I would choose to have a money formatter TALES construct, because I hate having to go through my templates again when I start adding another currency for instance. Best,