I've created a ViewTemplate that adds a table of editable metadata to any
tiddler with the tag "Book". Here is a simplified example:
<$list filter=[all[current]tag[book]]>
|Book title|<$edit-text field=book-title />|
|Author|<$edit-text field=author />|
</$list>
Now I intend to set the title of these tiddlers to something like
{!!book-title} - {!!author}. But I'd rather not do it manually, so I
thought maybe I could use an action widget to automatically set the title
as the fields are being edited:
\define actions()
<$action-setfield tiddler=<<currentTiddler>> title={{{
[{!!book-title}addsuffix[ - ]addsuffix{!!author}] }}}/>
\end
<$list filter=[all[current]tag[book]]>
|Book title|<$edit-text field=book-title inputActions=<<actions>> />|
|Author|<$edit-text field=author inputActions=<<actions>> />|
</$list>
Anyway you more enlightened folks will immediately see that this won't
work, because the action-widget will create a new tiddler rather than edit
the title of the current one.
So I'm wondering if there are any clever workarounds here? (I would also be
happy with a button to set the title based on fields, but this approach
seems to suffer from the same problem.)
Thanks in advance for your help.
--
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/b2382652-e926-453c-b67f-804255c35eben%40googlegroups.com.