From 7d1e3f4c35cfed53523489f6cba9cc14fc371b94 Mon Sep 17 00:00:00 2001 From: Marxsal Date: Mon, 19 Dec 2016 03:27:50 -0800 Subject: [PATCH] Add docs for making a custom New Journal button (#2664) Includes change to 'Creating journal tiddlers' to link up to new Instructional tiddler. --- .../howtos/Making a custom journal button.tid | 38 +++++++++++++++++++ .../Creating journal tiddlers.tid | 6 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 editions/tw5.com/tiddlers/howtos/Making a custom journal button.tid diff --git a/editions/tw5.com/tiddlers/howtos/Making a custom journal button.tid b/editions/tw5.com/tiddlers/howtos/Making a custom journal button.tid new file mode 100644 index 000000000..7871de31d --- /dev/null +++ b/editions/tw5.com/tiddlers/howtos/Making a custom journal button.tid @@ -0,0 +1,38 @@ +created: 20160424150551727 +modified: 20161218024440693 +tags: [[Customise TiddlyWiki]] +title: Making a custom journal button +type: text/vnd.tiddlywiki + +To get your own ''//custom//'' Journal button, start by cloning the [[New Journal|$:/core/ui/Buttons/new-journal]] button. + +Then create your own config tiddlers, eg: + +* ``$:/config/myNewTiddler/Tags`` and ... +* ``$:/config/myNewTiddler/Title`` + + +Edit your custom button and "search and replace" the config tiddler names. + +Change the following lines, near the end of the tiddler +from + +``` +<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}> +<$set name="journalTags" value={{$:/config/NewJournal/Tags}}> +``` + +to + +``` +<$set name="journalTitleTemplate" value={{$:/config/myNewTiddler/Title}}> +<$set name="journalTags" value={{$:/config/myNewTiddler/Tags}}> + +``` + +if you want to see your config tiddlers in the sidebar use: + +``` +<$set name="journalTitleTemplate" value={{config/myNewTiddler/Title}}> +<$set name="journalTags" value={{config/myNewTiddler/Tags}}> +``` diff --git a/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid b/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid index 572a188a7..1825995d5 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid @@ -1,5 +1,5 @@ created: 20141010093214683 -modified: 20160610081833756 +modified: 20161218024621209 tags: [[Working with TiddlyWiki]] title: Creating journal tiddlers type: text/vnd.tiddlywiki @@ -34,3 +34,7 @@ To configure how new journal entries are created, visit the ''Basics'' tab under Hint: if you want to create a separate journal tiddler whenever you click ''new journal'' (even if you do this several times in the same day), you can include the clock time in the title format. Specify something like `YYYY-0MM-0DD at 0hhh0mm'0ss''` as the date format. Another useful trick is to include `$(currentTiddler)$` somewhere in the title format. This means that if you click ''new journal here'' on several different tiddlers, the title of each of those tiddlers will form part of the name of the resulting journal entries. + +! Making a custom new journal button + +Visit the [[Making a custom journal button]] tiddler for instructions on how to make your own custom New Journal button \ No newline at end of file