2864 Posts in 732 Topics by 700 members
Template Questions
SilverStripe Forums » Template Questions » literal dollar sign in template
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 1617 Views |
-
literal dollar sign in template

19 May 2009 at 7:41am
What is the right way to include a literal dollar sign in a template?
I've got some JavaScript, and "$f" is getting parsed out to nothing... kind of annoying.
I tried escaping the dollar sign to no avail. Ultimately I wrote a "DollarSign" function in the Page model that simply returns a literal dollar sign. So in the template "{$DollarSign}f" gets me what I need. It just seems so inelegant.
-
Re: literal dollar sign in template

23 May 2009 at 1:36am
Hum...I'm not recalling any way to escape the dollar sign using the current template parsing engine.
The template parsing patch I submitted implements escaping, such that template code "$$Something" will be output as a literal "$Something".
Ben
| 1617 Views | ||
|
Page:
1
|
Go to Top |


