|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
sreenivas Smarty n00b
Joined: 24 Sep 2012 Posts: 2
|
Posted: Mon Sep 24, 2012 5:35 am Post subject: How to remove comma from a number in .tpl file |
|
|
Hi,
I need to remove a comma from a number which comes dynamic to template file. e.g (if a number is like 1,112. need to display 1112).
below is my code.
<td>${variableMap[key]}</td> |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Mon Sep 24, 2012 10:59 am Post subject: Re: How to remove comma from a number in .tpl file |
|
|
Code: |
<td>${variableMap[key]|replace:','}</td>
|
Last edited by douglassdavis on Fri Sep 28, 2012 12:40 pm; edited 2 times in total |
|
Back to top |
|
sreenivas Smarty n00b
Joined: 24 Sep 2012 Posts: 2
|
Posted: Fri Sep 28, 2012 8:21 am Post subject: |
|
|
Hi douglassdavis,
when run below mentioned code, I am getting following error
freemarker.core.ParseException: Encountered ":"
any other solution ??? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Sep 28, 2012 10:24 am Post subject: |
|
|
You are usingthe Java freemarker template engine, not Smarty..... |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|