Help: <$view> widget template for currency?

69 views
Skip to first unread message

JD

unread,
Oct 19, 2018, 11:18:59 AM10/19/18
to TiddlyWiki
Hello everyone,

I was wondering if there's a way for the <$view> widget to display currency?

I understand that I can do this for dates: <$view tiddler="New Tiddler" format="date" template="Template Tiddler"/> 

Theoretically, I should be able to do this, too:  <$view tiddler="New Tiddler" format="currency" template="Template Tiddler"/> 

where, for example, New Tiddler contains this: 15550 

and Template Tiddler contains this: **,**.**

So the above fictional <$view> widget invocation will display this: 15,550.00

or if  Template Tiddler contains this: UNIT **,**.**

will display this: UNIT 15,550.00

Has anyone with the same need come up with a solution? I might have to learn JS for this if not... Or maybe I can request this as a feature either to TW itself or the ever-useful Formulas plugin :)

Thank you all!

-jd

Thomas Elmiger

unread,
Oct 19, 2018, 11:48:38 AM10/19/18
to TiddlyWiki
Hi JD,

My simple math plugin RPN can do locale formatting for numbers. You would just have to add the currency with your own macro (I usually add 0 or multiply by 1 to leave the input unchanged).

See usage tab on https://tid.li/tw5/plugins.html#%24%3A%2Fplugins%2Ftelmiger%2Frpn

Cheers,
Thomas

JD

unread,
Oct 22, 2018, 10:45:30 AM10/22/18
to TiddlyWiki
Hi Thomas,

Thank you for directing me to your plugin! I got it to work perfectly, thank you so much!

-jd
Reply all
Reply to author
Forward
0 new messages