I am having a problem getting a fairly simple process working in TiddlyWiki.
I want to create a new tiddler based on a template. The template includes a
Templates tag so I can see all my templates in my TOC. When I create a new
tiddler using the template, I want to remove the Templates tag.
The name of the template tiddler is "Source Tiddler". In a button, I use
$action-createtiddler. Because the title of the created tiddler may be
different from what's specified in the $basetitle attribute, I supply the
$savetitle attribute with a place to store the actual title. In the code
below I used a field in a temporary tiddler ($:/temp/create!!actual-title).
I then try to remove the Templates tag from the newly created tiddler, as
show in the $fieldmangler widget in the code.
<$button>
<$action-createtiddler
$basetitle="Created Tiddler"
$savetitle = "$:/temp/create!!actual-title"
$template="Source Tiddler"/>
<$fieldmangler tiddler={{$:/temp/create!!actual-title}}>
<$action-sendmessage
$message="tm-remove-tag"
$param="Templates"/>
</$fieldmangler>
<$action-deletetiddler $tiddler="$:/temp/create"/>
Create New Tiddler
</$Button>
This creates the new tiddler, and stores the correct value in the field
(which I verified by commenting out the action-deletetiddler code).
However, the tag does not get removed. I have tried storing the actual
title in a field in the tiddler containing the button and in the text of a
new tiddler, but cannot seem to figure out the correct syntax to use so the
$fieldmangler widget correctly sets the currentTiddler.
Note that if I hard code the $fieldmangler widget as follows, the tag is
correctly removed!
<$fieldmangler tiddler="Created Tiddler">
So I would like advice on 1) Where should I store the savetitle and 2) what
is the appropriate syntax to use for the tiddler attribute in the
$fieldmangler widget?
Thank you.
Ken
--
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/bce25bb9-3d5f-463d-8764-bcef527db84dn%40googlegroups.com.