On Monday, May 17, 2021 at 11:08:35 AM UTC+2 vpl wrote: I try to invokea macro that reset tiddler fields when we open it. By > opening I do not mean *for editing*, I mean the tiddler is invoked via a > link for example >
hmmmm, You should have highlighted the _not_ ... I did only see/read *for editing*. I do have a widget, which is called <$trigger actions=<<anyAction>> /> ... It is "triggered" whenever the widget is rendered or re-rendered. ... So it has some potential to completely brick your wiki, if done wrong. ... The risk to loose data is especially high, while developing the action-code and the "preview pane" is active. Because <$action-setfield .. with wrong parameters can completely ruin tiddler content. ... So be warned .... BACKUP - BACKUP - BACKUP see: https://wikilabs.github.io/editions/trigger/ There is no documentation yet. So you have to open the tiddlers in the link, to see what's going on. I would implement the development code like this: title: myFooter tags: $:/tags/ViewTemplate <$list filter="[all[current]tag[test]]"> <$trigger actions= ...../> </$list> So you can use the tag: test to switch the action on / off. have fun! mario PS: Be sure to BACKUP - BACKUP - BACKUP PPS: The preview-pane will trigger the actions!!! -- 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 tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7178fff0-30e5-43ef-a3bf-7952019277a3n%40googlegroups.com.