Template Tiddlers

96 views
Skip to first unread message

Fábio Emilio Costa

unread,
Sep 15, 2011, 3:51:58 PM9/15/11
to tiddl...@googlegroups.com
There is any way to create Template Tiddlers? For example, I want to
save notes in a specific format (For example, an RPG Character
Record). Have any simple way other than create a model Tiddler and
copy-paste it every time?

Thanks

--

Obrigado!

Fabio Emilio Costa                 São Bernardo do Campo - SP - Brazil
fabioco...@gmail.com            Linux User #416439(counter.li.org)
MSN: fabioco...@gmail.com                          ICQ #:173799674
Yahoo! Messenger:hufflepuff0305                  Twitter:@HufflepuffBR

Orkut Profile: www.orkut.com/Profile.aspx?uid=16619557238254357700
Blog: hogwartslinux.wordpress.com
"Copie. Seja Legal. Não seja trouxa! Use Software Livre!"

David Masterson

unread,
Sep 15, 2011, 5:41:44 PM9/15/11
to TiddlyWiki
Took me a long time to figure this out as well ... and I'm still
investigating this. You could add this:

<<newTiddler label:"new task" title:"New Task" tag:"task" text:
{{store.getTiddlerText('TaskTemplate')}}>>

to your SideBarOptions or MainMenu. This will give you a "new task"
button that will create a new tiddler and fill it in with a copy of
the "TaskTemplate" tiddler. Obviously, by changing the parameters
here, you can create multiple buttons for creating tiddlers from
different templates.

On Sep 15, 12:51 pm, Fábio Emilio Costa <fabiocosta0...@gmail.com>
wrote:
> There is any way to create Template Tiddlers? For example, I want to
> save notes in a specific format (For example, an RPG Character
> Record). Have any simple way other than create a model Tiddler and
> copy-paste it every time?
>
> Thanks
>
> --
>
> Obrigado!
>
> Fabio Emilio Costa                 São Bernardo do Campo - SP - Brazil
> fabiocosta0...@gmail.com            Linux User #416439(counter.li.org)
> MSN: fabiocosta0...@gmail.com                          ICQ #:173799674

julien23

unread,
Sep 16, 2011, 3:36:45 AM9/16/11
to TiddlyWiki
Almost the same, I call for new tiddlers like this :

<<tiddler NewTaggedTiddler with:{{tiddler.title}} {{tiddler.title}}
TemplateCompany>>

[[NewTaggedTiddler]]
<<newJournal title:YYYY_0MM_0DD_0hh_0mm_0ss focus:"title" text:
{{store.getTiddlerText("$3")}} label:+ [[$1]] [[$2]] >>

Michael.Tarnowski

unread,
Sep 16, 2011, 8:45:15 AM9/16/11
to TiddlyWiki
Hi Fabio,

Rich Carrillo has published TiddlerTemplatesMacro which shows you a
set of predefined templates to select from for generating new
tiddlers. Unfortunately the url (http://www.kultofbubb.net/tiddlywiki)
disappeared.

But posted the source code in a previous post on the same issue:

http://groups.google.com/group/tiddlywiki/browse_thread/thread/e293cfc912f44a2e/1a4b6f7efcf1ff46?lnk=gst&q=TiddlerTemplatesMacro#1a4b6f7efcf1ff46

Hope that helps
Michael



On 15 Sep., 21:51, Fábio Emilio Costa <fabiocosta0...@gmail.com>
wrote:
> There is any way to create Template Tiddlers? For example, I want to
> save notes in a specific format (For example, an RPG Character
> Record). Have any simple way other than create a model Tiddler and
> copy-paste it every time?
>
> Thanks
>
> --
>
> Obrigado!
>
> Fabio Emilio Costa                 São Bernardo do Campo - SP - Brazil
> fabiocosta0...@gmail.com            Linux User #416439(counter.li.org)
> MSN: fabiocosta0...@gmail.com                          ICQ #:173799674

axelm

unread,
Sep 16, 2011, 12:03:00 PM9/16/11
to tiddl...@googlegroups.com
I really like this.
How would I go about, after you click the button, to have it ask for a title?
So instead of "New Task", I could enter a title.


<<newTiddler label:"new task" title:"New Task" tag:"task" text:
{{store.getTiddlerText('
TaskTemplate')}}>>

thanks,

axelm

Eric Shulman

unread,
Sep 16, 2011, 12:40:03 PM9/16/11
to TiddlyWiki
> How would I go about, after you click the button, to have it ask for a
> title?
> So instead of "New Task", I could enter a title.
>
> <<newTiddler label:"new task" title:"New Task" tag:"task" text:
> {{store.getTiddlerText('
> TaskTemplate')}}>>

The values of the macro parameters are calculated when the macro is
*rendered*. To prompt for input when *clicked*, you need to add:

http://www.tiddlytools.com/#ClickifyPlugin

Then, you can write:

<<clickify newTiddler ... title:{{prompt("Enter a new
title")||"NewTiddler"}} ... >>

When clicked on, the evaluated parameter for 'title' is invoked:
prompt("Enter a new title")||"NewTiddler"

This asks for text input. If the user clicks Cancel, it uses
"NewTiddler" as a fallback name (note: unfortunately, you can't stop
the click handler once it starts, so cancel can't actually end the
processing, but it can use a fallback value)

enjoy,
-e


>
> thanks,
>
> axelm

axelm

unread,
Sep 16, 2011, 3:34:26 PM9/16/11
to tiddl...@googlegroups.com
Fantastic, that works.

Thank you, eric.

axelm


Reply all
Reply to author
Forward
0 new messages