1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-02 08:06:17 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-rename-tiddler.tid
saqimtiaz 7911007973
Revised: toggling relink in tm-rename-tiddler (#4723)
* switch boolean logic in new parameters

Use renameinTags and renameInLists instead of dontRenameInTags and dontRenameInLists respectively. This avoids users having to think through double negatives, as well as corresponds better to the setting in $:/config/RelinkOnRename

* Updated docs for revised parameters for tm-new-tiddler
2020-06-19 18:20:25 +01:00

37 lines
1.6 KiB
Plaintext

caption: tm-rename-tiddler
created: 20190909133618113
modified: 20190909133618113
tags: Messages navigator-message
title: WidgetMessage: tm-rename-tiddler
type: text/vnd.tiddlywiki
The `tm-rename-tiddler` message renames a tiddler by deleting it and recreating it with a new title. The rename tiddler message requires the following properties on the `event` object:
|!Name |!Description |
|from |Current title of tiddler |
|to |New title of tiddler |
|renameInTags |<<.from-version "5.1.23">> Optional value "no" to disable renaming in tags fields of other tiddlers (defaults to "yes") |
|renameInLists |<<.from-version "5.1.23">> Optional value "no" to disable renaming in list fields of other tiddlers (defaults to "yes") |
The rename tiddler message is usually generated with the ButtonWidget and is handled by the NavigatorWidget.
! Examples
To rename a tiddler called Tiddler1 to Tiddler2 and also renaming Tiddler1 in tags and list fields of other tiddlers:
```
<$action-sendmessage $message="tm-rename-tiddler" from="Tiddler1" to="Tiddler2" />
```
To rename a tiddler called Tiddler1 to Tiddler2 and not rename Tiddler1 in tags and list fields of other tiddlers:
```
<$action-sendmessage $message="tm-rename-tiddler" from="Tiddler1" to="Tiddler2" renameInTags="no" renameInLists="no"/>
```
To rename a tiddler called Tiddler1 to Tiddler2 and respect the setting in the tiddler $:/config/RelinkOnRename for whether to rename Tiddler1 in tags and list fields of other tiddlers:
```
<$action-sendmessage $message="tm-rename-tiddler" from="Tiddler1" to="Tiddler2" renameInTags={{$:/config/RelinkOnRename}} renameInLists={{$:/config/RelinkOnRename}}/>
```