Creating custom Tiddler frameworks with fields

219 views
Skip to first unread message

Florian Felix

unread,
Mar 29, 2021, 5:24:20 PM3/29/21
to TiddlyWiki
Hey,
so I am thinking of several usecases where I would like to be able to create custom Tiddler templates, defined by custom fields, but i don't really find where i could do that?

For example I want a reference system that could be a bit more complex with some interdependencies, and i think managing this via links and tags would clutter the user interface and defining templates could help for automating this. at least i

I see a quote, scan it via OCR or copy it , then I can open a new "quote" tiddler (Or I just want to write a note) . It gives me the option to insert an author/person, and a source. There are multiple options for sources like website, book ...
I have an author/person as well as a "sources" overview where I can add details to sources or new ones. For author/person the quotes and notes from different sources are automatically transcluded. the sources overview is structured into the different types. when I click on a singular source, all quotes and notes appear, and maybe a review (if its written). if its a book, I can quickly add image, preferabbly link it to my inventaire.io account.
If it's a webpage / file document I might want to link it with my zotero library.  (these integratoins obviously are for the future, but should be held in mind)

How can I approach this? Is this even plausible way? :)

Florian Felix

unread,
Mar 29, 2021, 5:24:57 PM3/29/21
to TiddlyWiki
*I don't really find how I could do that

Soren Bjornstad

unread,
Mar 29, 2021, 6:36:16 PM3/29/21
to TiddlyWiki
Hi Florian,

I'm not sure I'm understanding what you're asking for – when you say you want to be able to "create custom tiddler templates defined by custom fields," do you mean you want TiddlyWiki templates to appear on tiddlers depending on the contents of a field? Or that you want an easier way to create tiddlers that start with particular fields? Do you need a custom interface for editing the different types of tiddlers?

TiddlyWiki can do all of that for sure, but they're very different things!

I recently did a screencast that might clarify some of this if you have an hour to burn.

Florian Felix

unread,
Mar 30, 2021, 6:03:47 AM3/30/21
to TiddlyWiki
yes i want to define several tiddler categories via fields (that i need to define, too) and be able to create them out of a menu (like i can create journals, but those are not defined by fields, right)

Anjar

unread,
Mar 30, 2021, 9:59:49 AM3/30/21
to TiddlyWiki
Hi Florian,

I am not sure I understood exactly what you mean by defining categories via field. Is this what you imagine: A menu with various tiddler types, when clicking the button for "Quote", you create a quote tiddler with predefined fields and content?

Here is a suggestion: (1) Make template tiddlers with title starting with "$:/template", for example $:/template/quote. To these template tiddlers, (2) add fields contents, and (3) a field called tiddlertype with the name of the template, eg. tiddlertype: Quote

Now, (4) add this to a separte tiddler:

\define tiddlername() {{!!tiddlertype}}: <<now "YYYY-0MM-0DD 0hh:0mm:0ss" >>

<$list filter="[prefix[$:/template]]">
<$button>
<$wikify name=newtiddlername text=<<tiddlername>> >
<$action-createtiddler $basetitle=<<newtiddlername>> $template=<<currentTiddler>> />
<$action-navigate $to=<<newtiddlername>> />
<$action-sendmessage $message="tm-edit-tiddler" $param=<<newtiddlername>>/>
</$wikify>
Create {{!!tiddlertype}} Tiddler
</$button>
</$list>

This code will generate a button for each of you templates. When you click the button, a new tiddler is created from the corresponding template and opened in edit mode. The new tiddler will get a title like "Quote: 2021-03-30 14:30:00" and have the fields and contents of $:/template/quote

Best,
Anders

Florian Felix

unread,
Apr 8, 2021, 3:38:58 AM4/8/21
to TiddlyWiki
Oh thanks yeah that’s it :)
Reply all
Reply to author
Forward
0 new messages