Templating language overview

54 views
Skip to first unread message

Peter Ajtai

unread,
Oct 4, 2018, 1:46:45 PM10/4/18
to TiddlyWiki
Hi all,

I'm having a hard time wrapping my head around the templating language used in Tiddlers, so I'm looking for a good overview of the language syntax and concepts.

Essentially something like the Introduction to Filter Notation Tiddler, but for the whole language... something like a Summary of Notations Types Used.

For example is there a page that summarizes what angle brackets, curly braces, etc, mean? Is there a name for this templating language? Is it a separate repo with it's own docs, or is it custom to TiddlyWiki?

Specifically, some of the things I'm wondering are:

why are there 2 curly braces surrounding this:
{{MyTiddler}}

3 curly braces surrounding this:
{{{ 2018-10-04 || DailyTiddler }}}

two angle braces surrounding this:
<<list-links filter:"[tags[]prefix[20]]">>

and only one angle brace in front of $X here:
<$set name=dateToday value=<<currentTiddler>>>
    <$list filter="[tag<dateToday>]">
        <h2><$link><$transclude field="title" mode="block"/></$link></h2>
        <$transclude mode="block"/>
    </$list>
<$set>

I've been reading the docs, but many of the tiddlers I found are a little too granular to answer the broader questions above without reading a lot of individual tiddlers.

I know this is a pretty broad question. I'm hoping there's a quick start / summary you can point me to.

Thanks!

Mark S.

unread,
Oct 4, 2018, 4:34:38 PM10/4/18
to TiddlyWiki

{{MyTiddler}}

Double curly brackets indicate a transclusion. (the contents of another tiddler are brought in here)


3 curly braces surrounding this:
{{{ 2018-10-04 || DailyTiddler }}}


I think that's wrong, or unnecessary.  Three curly braces indicates that a filter notation is inside the brackets that will be converted into a list of matching tiddler titles.

 
two angle braces surrounding this:
<<list-links filter:"[tags[]prefix[20]]">>


Two angle braces indicate a macro or a variable (they're actually the same thing, internally).
 
and only one angle brace in front of $X here:
<$set name=dateToday value=<<currentTiddler>>>
    <$list filter="[tag<dateToday>]">
        <h2><$link><$transclude field="title" mode="block"/></$link></h2>
        <$transclude mode="block"/>
    </$list>
<$set>


 
The tags with <$ are like HTML tags, only with superpowers. They're called widgets. You can look up the documentation for most of them by appending the word "widget" to the keyword. e.g., Searching for "listwidget" will find documentation for the <$list> widget. Most of the things I described for {{, {{{, and << brackets are actually just wikitext short-hand for widgets that get called to do the actual work.

I've been working on a tutorial/book in my spare time, but think it will be awhile before it's ready ;-)

Eric Shulman has a book that you may find useful:  http://tiddlytools.github.io/InsideTW/

Good luck!
-- Mark


 
. That's why they always appear in pairs or with the final slash.

Peter Ajtai

unread,
Oct 4, 2018, 4:47:32 PM10/4/18
to TiddlyWiki
Thanks Mark, that's very helpful.

That's basically what I was looking for.

I have to say that the help provided in this forum is fantastic.
Reply all
Reply to author
Forward
0 new messages