|
List Info
Thread: Creating a new tiddler template
|
|
| Creating a new tiddler template |

|
2007-12-31 06:21:48 |
Hi there.
I'm creating a procedure we can follow for each evening at
work, and I
keep that in "nightshift procedure" tiddler.
What I want is a button instead of the new journal button
which is
called "new nightshift" and it basically creates a
new journal with a
few twists.
1) It adds the "nightshift" tag to it
2) adds all the content from the "nightshift
procedure" tiddler into
the new journal tiddler
3) if possible, doesn't open it so you go into edit mode,
just creates
a new tiddler and displays it.
I would be interested in not actually keeping the info in
the tiddler,
as the whole thing is pretty static, and all I really want
is the log
that the journal was created and by whom, I don't really
need to bloat
it with excessive copies of what's in the "nightshift
procedure"
tiddler.
I'd love to do it in a spiffy way to minimise clutter and
having the
same data over and over again.
I've no idea how to do it, been trying to research it but
can't seem
to do it properly. Any suggestions?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2007-12-31 07:15:41 |
Hi Kashgarinn,
Take a look at the NewSavedTiddler.js Saq posted in the
following
thread:
http://groups.google.
com/group/TiddlyWiki/browse_thread/thread/3098a7a55b72a6aa/b
ed6e9ec66bbc366?lnk=gst&q=newTiddlerWithForm+tags#bed6e9
ec66bbc366
With this macro installed you're able to create a new
tiddler while
having it opened in view mode.
For adding a tag and a custom text - the new tiddler's macro
with
parameter would to. And for not having the same long text
included I
would just use the <<tiddler TiddlerTite>> macro
in each.
Regards,
W.
On 31 Dez., 13:21, Kashgarinn <steint... gmail.com> wrote:
> Hi there.
>
> I'm creating a procedure we can follow for each evening
at work, and I
> keep that in "nightshift procedure" tiddler.
>
> What I want is a button instead of the new journal
button which is
> called "new nightshift" and it basically
creates a new journal with a
> few twists.
>
> 1) It adds the "nightshift" tag to it
> 2) adds all the content from the "nightshift
procedure" tiddler into
> the new journal tiddler
> 3) if possible, doesn't open it so you go into edit
mode, just creates
> a new tiddler and displays it.
>
> I would be interested in not actually keeping the info
in the tiddler,
> as the whole thing is pretty static, and all I really
want is the log
> that the journal was created and by whom, I don't
really need to bloat
> it with excessive copies of what's in the
"nightshift procedure"
> tiddler.
>
> I'd love to do it in a spiffy way to minimise clutter
and having the
> same data over and over again.
>
> I've no idea how to do it, been trying to research it
but can't seem
> to do it properly. Any suggestions?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |
  Germany |
2007-12-31 08:08:03 |
> For adding a tag and a custom text - the new tiddler's
macro with
> parameter would to. And for not having the same long
text included I
> would just use the <<tiddler TiddlerTite>>
macro in each.
Wolfgang has already summarized everything you need - though
of course
you could also use the NewJournal macro instead of
NewTiddler:
http://tiddlywiki.com/#NewJournalMacro%20NewTiddlerMacro
Just one minor catch: Embedding macro calls into a macro
parameter can
be tricky.
So here's a workaround (not using NewSavedTiddler yet
though):
<<newJournal
"YYYY-0MM-0DD (week WW)"
label:"new nightshift"
prompt:"create a new nightshift tiddler"
text:{{"<<tiddler [[Nightshift
Procedure]]>" + ">"}}
tag:"nightshift"
>>
What's important here is the {} "text:"
parameter - I've
separated the two ">" characters to prevent
TiddlyWiki from thinking
that the original (NewJournal) macro ends there.
I have also added a custom date format* and a
prompt/tooltip, both of
which are optional.
HTH.
-- F.
* cf. http://www.
tiddlywiki.org/wiki/Timestamps
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2007-12-31 08:17:20 |
> text:{{"<<tiddler [[Nightshift
Procedure]]>" + ">"}}
> What's important here is the {}
"text:" parameter - I've
> separated the two ">" characters to
prevent TiddlyWiki from thinking
> that the original (NewJournal) macro ends there.
you can also write it like this:
text:{{"<<tiddler [[Nightshift
Procedure]]>>"}}
-e
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2008-01-02 03:20:36 |
Thanks alot for your replies, they worked great.
I was wondering how I could tag the tiddler with the number
of the
week, or the today date, is that possible?
Regards,
K.
On Dec 31 2007, 2:08 pm, FND <Ace_No... gmx.net> wrote:
> > For adding a tag and a custom text - the new
tiddler's macro with
> > parameter would to. And for not having the same
long text included I
> > would just use the <<tiddler
TiddlerTite>> macro in each.
>
> Wolfgang has already summarized everything you need -
though of course
> you could also use the NewJournal macro instead of
NewTiddler:
> http://tiddlywiki.com/#NewJournalMacro%20NewTiddlerMacro
>
> Just one minor catch: Embedding macro calls into a
macro parameter can
> be tricky.
> So here's a workaround (not using NewSavedTiddler yet
though):
> <<newJournal
> "YYYY-0MM-0DD (week WW)"
> label:"new nightshift"
> prompt:"create a new nightshift
tiddler"
> text:{{"<<tiddler [[Nightshift
Procedure]]>" + ">"}}
> tag:"nightshift"
> >>
> What's important here is the {}
"text:" parameter - I've
> separated the two ">" characters to
prevent TiddlyWiki from thinking
> that the original (NewJournal) macro ends there.
> I have also added a custom date format* and a
prompt/tooltip, both of
> which are optional.
>
> HTH.
>
> -- F.
>
> * cf.http://www.
tiddlywiki.org/wiki/Timestamps
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2008-01-02 03:25:48 |
I think AutoTaggerPlugin does that.
http://w
ww.tiddlytools.com/#AutoTaggerPlugin
Regards,
W.
On 2 Jan., 10:20, Kashgarinn <steint... gmail.com> wrote:
> Thanks alot for your replies, they worked great.
>
> I was wondering how I could tag the tiddler with the
number of the
> week, or the today date, is that possible?
>
> Regards,
> K.
>
> On Dec 31 2007, 2:08 pm, FND <Ace_No... gmx.net> wrote:
>
> > > For adding a tag and a custom text - the new
tiddler's macro with
> > > parameter would to. And for not having the
same long text included I
> > > would just use the <<tiddler
TiddlerTite>> macro in each.
>
> > Wolfgang has already summarized everything you
need - though of course
> > you could also use the NewJournal macro instead of
NewTiddler:
> > http://tiddlywiki.com/#NewJournalMacro%20NewTiddlerMacro
>
> > Just one minor catch: Embedding macro calls into a
macro parameter can
> > be tricky.
> > So here's a workaround (not using NewSavedTiddler
yet though):
> > <<newJournal
> > "YYYY-0MM-0DD (week WW)"
> > label:"new nightshift"
> > prompt:"create a new nightshift
tiddler"
> > text:{{"<<tiddler [[Nightshift
Procedure]]>" + ">"}}
> > tag:"nightshift"
>
> > What's important here is the {}
"text:" parameter - I've
> > separated the two ">" characters to
prevent TiddlyWiki from thinking
> > that the original (NewJournal) macro ends there.
> > I have also added a custom date format* and a
prompt/tooltip, both of
> > which are optional.
>
> > HTH.
>
> > -- F.
>
> > * cf.http://www.
tiddlywiki.org/wiki/Timestamps
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2008-01-02 03:25:58 |
I was a bit too quick.. Just tested whether the newly
created
nightshift tiddler would overwrite an already created
tiddler, and it
seems that it does.. Is it because I'm using the new journal
macro?
On Jan 2, 9:20 am, Kashgarinn <steint... gmail.com> wrote:
> Thanks alot for your replies, they worked great.
>
> I was wondering how I could tag the tiddler with the
number of the
> week, or the today date, is that possible?
>
> Regards,
> K.
>
> On Dec 31 2007, 2:08 pm, FND <Ace_No... gmx.net> wrote:
>
> > > For adding a tag and a custom text - the new
tiddler's macro with
> > > parameter would to. And for not having the
same long text included I
> > > would just use the <<tiddler
TiddlerTite>> macro in each.
>
> > Wolfgang has already summarized everything you
need - though of course
> > you could also use the NewJournal macro instead of
NewTiddler:
> > http://tiddlywiki.com/#NewJournalMacro%20NewTiddlerMacro
>
> > Just one minor catch: Embedding macro calls into a
macro parameter can
> > be tricky.
> > So here's a workaround (not using NewSavedTiddler
yet though):
> > <<newJournal
> > "YYYY-0MM-0DD (week WW)"
> > label:"new nightshift"
> > prompt:"create a new nightshift
tiddler"
> > text:{{"<<tiddler [[Nightshift
Procedure]]>" + ">"}}
> > tag:"nightshift"
>
> > What's important here is the {}
"text:" parameter - I've
> > separated the two ">" characters to
prevent TiddlyWiki from thinking
> > that the original (NewJournal) macro ends there.
> > I have also added a custom date format* and a
prompt/tooltip, both of
> > which are optional.
>
> > HTH.
>
> > -- F.
>
> > * cf.http://www.
tiddlywiki.org/wiki/Timestamps
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2008-01-02 06:44:42 |
> Just tested whether the newly created nightshift
tiddler would
> overwrite an already created tiddler, and it seems that
it does.
If the NewJournal (or NewTiddler) macro encounters an
already-existing
tiddler of the same name, it should open that tiddler in
edit mode
(not overwrite it).
Also, since we're using a date for the newly-created
tiddler's title,
that title should almost always be unique.
Could you elaborate on what's happening on your end?
> you can also [escape the embedded macro] like this:
> text:{{"<<tiddler [[Nightshift
Procedure]]>>"}}
Thanks, Eric, I had forgotten about this (simpler) method.
-- F.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2008-01-02 06:57:39 |
> Also, since we're using a date for the newly-created
tiddler's title,
> that title should almost always be unique.
Unless, of course, you invoke "new nightshift
tiddler" more than once
on the same day! If you really need to always have a new
journal
tiddler created, you can add a timestamp to the tiddler
title, like
this:
<<newJournal "MM/DD/YYYY 0hh:0mm"
...>>
-e
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Creating a new tiddler template |

|
2008-01-02 07:14:10 |
> I would be interested in not actually keeping the info
in the tiddler,
> as the whole thing is pretty static
Just in case:
You might be interested in "transclusion" to fill
placeholder values
in the [[Nightshift Procedure]] tiddler.
Basically, your [[Nightshift Procedure]] tiddler template
would look
like this:
|!Staffer|$1|
|!Time|$2|
Lorem ipsum dolor sit amet ...
Then your macro call might look like this:
---------------
<<newJournal
"YYYY-0MM-0DD (week WW)"
label:"new nightshift"
prompt:"create a new nightshift tiddler"
text:{{"<<tiddler [[Nightshift Procedure]]
with:"
+ '"' + config.options.txtUserName + '" '
+ '"' + (new
Date).formatString("YYYY-MM0-DD0 0hh:0mm") +
'"'
+ ">>"
}}
tag:"nightshift"
>>
---------------
This would automatically insert the current username and
timestamp.
More information on parametric transclusion here:
http://www.tiddlywiki.org/wiki/Transclusion#P
arametric_Transclusion
(Okay, there's just a link for now, but some day... )
HTH.
-- F.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
|
|