How can I simplify/abstract the Color and Icon cascades? I’m currently having the following:
$:/tags/TiddlerColourFilter
[kind[infusion]then{infusion!!color}]
[kind[coffee]then{coffee!!color}]
[kind[wine]then{wine!!color}]
etc
$:/tags/TiddlerIconFilter
[kind[infusion]then{infusion!!icon}]
[kind[coffee]then{coffee!!icon}]
[kind[wine]then{wine!!icon}]
etc
Which as far as I understand says
If current tiddler’s
kindfield is “infusion”, then apply theiconfield of theinfusiontiddler
I want to add many more kinds like salad, beer, pasta etc. Thus I’ll have to add many more lines like the above.
Could I somehow write a more abstract rule/filter/definition that would describe something like:
If current tiddler has a defined kind field, use its value to get the color/icon to be applied
I tried the following but it doesn’t work, I think because it gets the color field from the actual kind tiddler, and not what that links to:
[has[kind]then[get[kind]get[color]]