1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 02:20:28 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/macros/UnusedTitleMacro.tid
jed b1edcdb757 Add unusedtitle macro (#3880)
* Add uniquetitle macro

This macro is a wrapper on the $tw.wiki.generateNewTitle function to return a unique name, it has been requested multiple times in the forums.

* Add documentation tiddler for uniquetitle macro

* Add uniquetitle macro examples

* Change name from uniquetitle to unusedtitle for clarity

The title isn't unique, just not currently used in the wiki.

* Update uniquetitle to unusedtitle

* Change uniquetitle to unusedtitle

* Fix a typo
2019-03-26 21:57:58 +00:00

17 lines
480 B
Plaintext

caption: unusedtitle
tags: Macros [[Core Macros]]
title: unusedtitle Macro
type: text/vnd.tiddlywiki
The <<.def unusedtitle>> [[macro|Macros]] returns an unused title. Optionally you can provide a base title to generate the new title.
It uses the same method as the create new tiddler button, a number is appended to the end of the base name.
!! Parameters
;baseName
: A string specifying the desired base name, defaulting to `New Tiddler`
<<.macro-examples "unusedtitle">>