Hi Josiah,
I can assure you that previous versions of TW did not have mechanisms
where [2] is likely to work. In fact I am very confident that [2] does
indeed work how its supposed to: Whenever you edit the title, the
tiddler with the old title will not be deleted and the tiddler with the
new title will be added as a copy. (there will not be an option to not
do this)
Be sure to include the|action-sendmessage|in the proper
place,*before*the|tm-save-tiddler| message is sent.
Since|$:/core/ui/Buttons/save|isn't particularly large, here is the full
modified version of how it should look:
*$:/core/ui/Buttons/save*
|<$fieldmangler> <$button tooltip={{$:/language/Buttons/Save/Hint}}
aria-label={{$:/language/Buttons/Save/Caption}}
class=<<tv-config-toolbar-class>>> <$action-sendmessage
$message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
<$action-sendmessage $message="tm-add-field"
$name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
<$action-sendmessage $message="tm-add-field" $name="draft.of"
$value={{!!draft.title}}/> <$action-sendmessage
$message="tm-save-tiddler"/> <$list
filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/done-button}} </$list> <$list
filter="[<tv-config-toolbar-text>prefix[yes]]"> <span
class="tc-btn-text"><$text
text={{$:/language/Buttons/Save/Caption}}/></span> </$list> </$button>
</$fieldmangler>|
I hope this makes things a little clearer. Also note that the position
of the action widget would also allow the insertion of another field,
maybe called|copy-of|, which could track the original tiddler that the
modified version came from, before the title was altered.
/Andreas
Am 31.05.2016 um 20:14 schrieb Josiah:
Andreas
Unfortunately [2] did not work. Perhaps I should have made clearer
that I am working in TW5?
Josiah
On Monday, 30 May 2016 19:29:50 UTC+2, Josiah wrote:
Thanks very much. The solution I need is likely [2]. i will try it.
Best wishes
Josiah
On Monday, 30 May 2016 18:23:43 UTC+2, Andreas Hahn wrote:
Hi Josiah,
that specific behaviour is governed by
the|handleSaveTiddlerEvent|method of the navigator widget
which you can see in [1]. To change that, you can either edit
the code over there (which you might not wanna do), or add an
action widget to|$:/core/ui/Buttons/save|which keeps
the|draft.of|and|draft.title|field of the draft in sync,
before invoking the save routine (see [2]). Obviously you can
also get arbitrarily fancy with the UI, like adding a checkbox
that steers that behaviour, but it sounds like a simple change
like that would do the trick for you.
/Andreas
[1]https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/widgets/navigator.js#L354-L357
<https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/widgets/navigator.js#L354-L357>
[2] adding|<$action-sendmessage $message="tm-add-field"
$name="draft.of"
$value={{!!draft.title}}/>|to|$:/core/ui/Buttons/save|should
be sufficient.
Am 30.05.2016 um 09:28 schrieb Josiah:
As is, when you edit the TITLE of a tiddler and save it it
overwrites the previous version. How difficult would it be
change that behavior so that /when you change the title of an
existing tiddler it offers the OPTION to SAVE it as a NEW
tiddler?/ My use case: I have hundreds of small tiddlers that
are similar I constantly create variant versions of. Right
now I have to remember to clone. As is, I keep inadvertently
overwriting Tiddlers I want to keep. Best wishes Josiah
-- 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 post to this group,
send email to [email protected]. Visit this group at
https://groups.google.com/group/tiddlywiki
<https://groups.google.com/group/tiddlywiki>. To view this
discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/0004d98d-1dd2-48a0-8d80-2e81d876f19e%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/0004d98d-1dd2-48a0-8d80-2e81d876f19e%40googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
-- 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]
<mailto:[email protected]>. To post to this
group, send email to [email protected]
<mailto:[email protected]>. Visit this group at
https://groups.google.com/group/tiddlywiki. To view this discussion on
the web visit
https://groups.google.com/d/msgid/tiddlywiki/2035030f-5ebf-462d-8d91-bb87629891a3%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/2035030f-5ebf-462d-8d91-bb87629891a3%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/a2a4396a-9f51-b26b-e3df-c75bdbc7c449%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.