Jake wrote:
>
> Can it be done via some "var" thingy?
>
A bit unclear what you mean. There is a variable created and named in my
proposed code, i.e the "variable=color" bit. This variable gets the value
that comes out from the filter. Something like $vars would do a similar
thing if you use it like
<$vars color={{{ the filter }}} >
...but you'd still have to put that color in the context of the "span"
thingy.
BUT, come to think of it, you can actually do this:
<$vars style={{{ [{!!rating}compare:integer:gt[70]then[green]]
~[{!!rating}compare:integer:gt[50]then[grey]] ~[[red]]
+[addprefix[color:]]" }}} >
Rating <span style=<<style>>>{{!!rating}}</span>
</$vars>
I.e the span style attribute does accept <<...>> so made the filter output
a full css declaration rather than just the properytvalue.
<:-)
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ac3aa78a-59d9-467a-b3d9-90999994bea3o%40googlegroups.com.