Possible to create new Tiddler with pre-filled Fields and Tags

276 views
Skip to first unread message

David

unread,
Mar 30, 2020, 10:55:13 AM3/30/20
to TiddlyWiki
I am using some cool listWidget code to create a todo list that I'm really enjoying.  It uses tiddlers as the data source.

But creating new todo items requires a few things to make it appear on my list.  I"m hoping to make it easier to add items. Things I hope to get pre-filled:
  1. Add "Task" tag
  2. Add "locationContext" field with empty value
  3. Add "priority" field with value of "3"
So if you know of a way to create a tiddler that has these values and is then ready for me to put in the title, I'd love to hear it.

Possible work around....

I created a "boilerplate" tiddler with all the values set.  I can then just clone that one and it works pretty well.  But when I'm done entering my new tiddler, the boilerplate, that I cloned, is there, needing to be closed.  Is it possible to bring up just that clone with less taps?

what I have to do now to use the Clone method:
  1. Click the "New" link I have that opens the boilerplate tiddler
  2. Type in  the Task's Title
  3. Save it
  4. Find the boilerplate tiddler, which is now open, and close it.
Is it possible to skip opening the boilerplate tiddler and open the cloned version directly?

Thanks, you guys have been great!

Mark S.

unread,
Mar 30, 2020, 11:02:20 AM3/30/20
to TiddlyWiki
I often use the "clone" approach for months before I get around to making a "new thingy" button.

You can learn about one way to create a new tiddler with pre-filled values here:

file:///C:/Users/Mark/Downloads/tiddlywiki-5.1.21-with-storage.html#ActionCreateTiddlerWidget

Note the example button towards the bottom.

David

unread,
Mar 30, 2020, 11:46:18 AM3/30/20
to TiddlyWiki
Your link was to your local machine, but I used the last link part to google for that page.  Worked well and I settled on this code to create a new button to open up a clone of my template....

<$button message="tm-new-tiddler" param="TaskTemplate">New Task</$button>

Thanks again!

Mark S.

unread,
Mar 30, 2020, 12:08:21 PM3/30/20
to TiddlyWiki
Sorry about the mistake. Just this last week I started using my own copy of tiddlywiki. Just in case there was bandwidth problems with everyone working or netflixing (new word!) from home.

scot

unread,
Mar 30, 2020, 12:54:52 PM3/30/20
to TiddlyWiki
Hi David,
you could create a button by putting this into the tiddler content. The template method is best if your making multiple tiddlers.

<$button>
<$action-sendmessage $message="tm-new-tiddler"
 title="My Task Tiddler"
 tags="Task"
 locationContext=""
priority="3"
/>
New Tiddler
</$button>

regards,
Scot

David

unread,
Mar 30, 2020, 3:17:02 PM3/30/20
to TiddlyWiki
Thank you Scot!  I'll try that out!

TonyM

unread,
Mar 30, 2020, 6:29:49 PM3/30/20
to TiddlyWiki
David

To extend Scott's suggestion you make the button visible on the view template and then set one or more values based on the current tiddlers field values.

locationContext={{!!locationContext}}

Thus clicking the button will create a new task based on the current tiddler.

I call this process setting the context. Personaly on my main organiser wiki I set domain, project and sometimes client values on every task, note etc... Domain is work/personal etc..

By having the new button on the tiddlers I only need a single click to make a related item.

I may package this one day.

Regards
Tony

David

unread,
Apr 7, 2020, 11:27:06 AM4/7/20
to TiddlyWiki
That's great!  I put the "New" buttons at the bottom of each section/context, with that as a prefilled value.  So it's super easy to create Tasks now.

Thank you and the others as well!

Sebastian Theilhaber

unread,
Apr 10, 2020, 9:09:43 AM4/10/20
to TiddlyWiki
Hi Scot,

I'm in no position to make and educated comment but playing with it showed interesting potential since a template can be produced on the basis of instructions rather than a 'template-tiddler'.

Since I know nothing about any of those things 'under the hood' and I'm really interested in using the idea, could I ask you some questions, please?

1) Can the "Type:"-field be manipulated this way? The lines from "title=" to "/>" seem to effect and put in various field (and a value), which is different.
2) Might not be relevant, but what is / does "locationContext"?

Regards, S

scot

unread,
Apr 10, 2020, 12:58:20 PM4/10/20
to TiddlyWiki
Hello S,
yes you can use the type field.

E.g.

type="image/jpeg"

title="" The text in between the quotes sets the title of the created tiddler.
This is helpful if you have a number of tiddlers with similar titles. Task, Task 1, Task2, Report, Report2 etc.

location/Context is a field which David is using for his task todo list. I presume he will add a relevant term such as work, home or something similar.

TonyM explained,

"I call this process setting the context. Personaly on my main organiser wiki I set domain, project and sometimes client values on every task, note etc... Domain is work/personal etc.."

location/Context="" will create a blank field named location/Context.

Example with type field set to image/jpeg

<$button>
<$action-sendmessage $message="tm-new-tiddler"
 title="Your Title Goes Here"
 tags="Your Tags Go Here"
 locationContext="personal"
priority="3"
type="image/jpeg"
/>
New Tiddler
</$button>

Regards,
Scot
Reply all
Reply to author
Forward
0 new messages