Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

literal dollar sign in template

Go to End

2 Posts   3073 Views


Community Member, 8 Posts

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.

Ben Gribaudo

Community Member, 181 Posts

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".