1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-28 16:23:15 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid
jeremy@jermolene.com 9faaa31299 Extend action-createtiddler to make new title available as a variable
I'm not sure if the docs are clear, but this is quite a big deal, and along with 582b156d5f makes working with action widgets a lot easier.
2021-06-01 09:41:14 +01:00

29 lines
930 B
Plaintext

created: 20200131150229551
modified: 20201020112544146
tags: ActionCreateTiddlerWidget
title: ActionCreateTiddlerWidget Example 4
type: text/vnd.tiddlywiki
\define testCreate()
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" />
\end
This example uses a base-title "base" and a template: [[ActionCreateTiddlerWidget Template]].
There will be new fields "aa" and "bb" which are added to the new tiddlers.
```
\define testCreate()
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" />
\end
<$button actions=<<testCreate>> >
Create Tiddler
</$button>
```
<$button actions=<<testCreate>> >
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/>
Create Tiddler
</$button> - Clicking this button will also open the Right sidebar: Recent tab