Hey guys,
it is me again. Still working on my website and coming up with another problem. I still can not completely wrap my head around how to achieve some simple - at least I think they are - things. I am writing a plugin for my site to track my beekeeping and therefore made a button which "creates" a new hive and increments a global counter.
However since this whole thing should be a plugin I do not want to store a "counter" within the sidebar tiddler containing the button but rather have a "state" tiddler handling this as there are a couple of things I want to increment (queens, hives, checks...). My problem is that I do not know how to "get" the value from the state tiddler in the first place so I can increment it and set the new value (increment macro does work).
As of now I have this (what do I have to insert at the question marks?):
<$button>New Hive
<$set name="counter" value=<<increment ???>>>
<$action-sendmessage $message="tm-new-tiddler" title=Hive #<<counter>> tags="active Hive" />
<$action-setfield $tiddler="$:/state/beehive" $field="hiveCounter" $value=<<counter>> />
</$set>
</$button>
Thanks in advance.
Cheers,
Tristan